I have multiple websites supposed to run each with its own domain (e.g. site1.com
, differentsite2.com
, othersite3.com
etc.).
The operative directories of each website are dedicated subfolder in /var/www/html/
e.g.
/var/www/html/site1
/var/www/html/site2
/var/www/html/site3
The virtual host for each website is something like
<VirtualHost *:80>
ServerName site1.com
ServerAlias www.site1.com
DocumentRoot /var/www/html/site1
<Directory /var/www/html/site1>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
with a dedicated config file in /etc/apache2/sites-available/
enabled with a2ensite
command
and the default config disabled with a2dissite 000-default.conf
others website are configured in a similar way with
<VirtualHost *:80>
ServerName site2.com
ServerAlias www.site2.com
DocumentRoot /var/www/html/site2
</VirtualHost>
etc.
Problem:
When I open www.site1.com
rather than showing index in its DocumentRoot
at /var/www/html/site1/index
as supposed,
It shows the index in main root at /var/www/html/index
Could someone help he to understand the issue?
The issue was caused by the fact Apache server was configured on port 8080 and Nginx on port 80 so when I invoked the site on port 80 the invocation was processed by Nginx.