I have 3 domains hosted on my Ubuntu server running Apache2 as DNS I am using cloudflare.example
, abc.example
and xyz.example
are accessing correct files that are inside abc.example/public_html
and xyz.example/public_html
folder but the third domain is accessing files from the root folder. Following is the content of my domain.example
file which is found under /etc/apache2/sites-available/domain.example
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName domain.example
ServerAlias www.domain.example
DocumentRoot /var/www/domain.example/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/domain.com/public_html/>
instead of<Directory /var/www/>