Open site with default server ip

I have 2 ip addresses on the server. Both open the standard DocumentRoot /var/www/html/ folder. How can I reassign the opening ip to the site folder?

For example, by ip: open DocumentRoot /home/user/


not sure if hestia will overwrite this but take a look into /etc/nginx/conf.d there should be confs with the IPs

1 Like

Also one one thing:

  1. SSL won’t work
  2. Might cause issues for SEO / Duplicated content
  3. You have to modify the config so you are able to run php
  4. And you might folder permissions issues

This is for the internal network. The site opens by domain without any problems. It is necessary for the server ip to open the site

I think this is permissions issue. But how to do it

1.nginx - /etc/nginx/conf.d/ added:
location / {
location ~* ^.+.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
root /home/user/web/;
access_log /var/log/apache2/domains/ combined;
access_log /var/log/apache2/domains/ bytes;
expires max;
try_files $uri @fallback;

and service nginx restart no effect

  1. In Apache section /etc/apache2/conf.d/ added
    #DocumentRoot /var/www/html/
    DocumentRoot /home/user/web/
    Alias /error/ /var/www/document_errors/

and service apache2 restart get Internal Server Error

Let me guess the /var/log/ said permission denied?

Ok, now it’s working. Thanks for all! After testing with apache config working with default permissions for users. Problem with .htaccess in my CMS.

Full config /etc/apache2/conf.d/

  # DocumentRoot /var/www/html/
  DocumentRoot /home/user/web/
  Alias /error/ /var/www/document_errors/

  <Directory /home/user/web/>
      AllowOverride All
  <Directory /home/user/web/>
      AllowOverride All
      Options +Includes -Indexes +ExecCGI

  <FilesMatch \.php$>
      SetHandler "proxy:unix:/run/php/|fcgi://localhost"
  SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

  IncludeOptional /home/user/conf/web/*