Apache ignoring documentRoot

Hi All,
We’ve set up a new account on a brand new server and when I visit the domain, it seems to be showing the apache default document root /var/www/html rather than the domain document root /home/{user}/public_html which is specified in the virtualhost for the new account. Can someone please help me with steps to debug this?

SYSTEM INFORMATION
OS type and version CENTOS8
Virtualmin version 6.17

Check here Hack to install Rocky - Virtualmin - Virtualmin Community

No solution but more info’s about howto on the centos 8 EOL OS!

There could be also Persons that could help you maybe.

https://www.virtualmin.com/documentation/web/troubleshooting/#The_Wrong_Site_Shows_Up

Thanks a lot for the replies guys. We checked that guide but we don’t think that’s the issue.
ip addr sh returns 3 results, one of which is 127.0.0.1 and one of which looks like some virtual adapter (enP23099s1) which has an IP6 address only. The primary IP of the server is there on eth0 and is identical to those listed in the virtualhost config. Could there be some other reason for this?

Are you sure you don’t have some other config file that’s being included that has a VirtualHost in it? If you installed, e.g. a package that sets up a web app, it may have added a new config file with a virtual host pointing to /var/www.

The reason this happens is because Apache thinks you’ve configured it to do this. There’s got to be a VirtualHost definition that is making this happen.

1 Like

Yes! We found an ssl.conf file set to listen to *:443. Commented it out, restarted and we’re finally up and running! Thanks so much Joe :+1:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.