DirectAdmin hostname shows page of customer instead of apache page

Bramus

Verified User
Joined
Jun 19, 2008
Messages
20
Location
The Netherlands
One of my servers is not showing the Default Apache webpage when i enter the hostname in a browser. Instead it will show the page of a customer that has a package on the server in the userlevel. When i check the /var/www/html file and the index.html i can see it is not showing any redirect html line.

Also the httpd.conf (in /etc/httpd/conf/) is showing document root as /var/www/html

It is an CentOS 6 machine
 
Last edited:
If there is no match to a virtualhost servername or serveralias apache will show the first vhost available on that ip.

There should be a file /etc/httpd/conf/extra/httpd-vhost.conf that should match your server hostname.

You can always fix all your conf files with the following command:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build rewrite_confs
 
Seems i'm having this issue again on the same machine. It is now redirecting to a host that is in the /etc/httpd/conf/extra/httpd-vhost.conf file (on the 1st line of the file), can I solve this somehow it won't show a customer page but just the default apache is functioning page or can i redirect to another website?
 
Seems i'm having this issue again on the same machine. It is now redirecting to a host that is in the /etc/httpd/conf/extra/httpd-vhost.conf file (on the 1st line of the file), can I solve this somehow it won't show a customer page but just the default apache is functioning page or can i redirect to another website?

httpd-vhosts.conf should include your main server IP, doesn't it?
 
httpd-vhosts.conf should include your main server IP, doesn't it?

Yes it does, but now i just see the difference, the server is behind NAT and the httpd conf has only the External IP address instead of the internal addres, think thats where it gets stuck. If i modify the file wil it keep working even with updates in HTTPD or when adding users?
 
You just need to copy httpd-vhosts.conf to /usr/local/directadmin/custombuild/custom/ap2/conf/extra, so that the IP wouldn't get overwritten in the future with "./build rewrite_confs".
 
Back
Top