[resolved] Apache problems: wrong documentroot after update.

jochemdu

New member
Joined
Aug 2, 2012
Messages
5
I have a major problem after updating apache and php with custombuild.

Suddenly none of my domains are reachable

All say: Apache is functioning normally
In the logs i noticed it is trying to access the directory: /var/www/html (File does not exist: /var/www/html/404.shtml)
That is a BIG Uh Oh because directadmin does NOT use that folder.

If i look into the httpd.conf is has the right documentroot: DocumentRoot /home/MYUSERNAME/domains/MYDOMAIN.nl/public_html

How can i reconfigure so it points to the right directories?

I also saw that when i start apache manually i get the following: [Tue Mar 05 22:14:46 2013] [warn] VirtualHost IP1:80 overlaps with VirtualHost IP1:80, the first has precedence, perhaps you need a NameVirtualHost directive
 
Hello,

try this

Code:
cd /usr/loca/directadmin/custombuild
./build update
./build rewrite_confs

and restart apache. Also make sure you've got not empty /etc/httpd/conf/ips.conf with all of your IPs inside.
 
Did not work.

That did not work. Still has the same symtons.

The contents of ips.conf is the following:
NOTE: Is is ok that only 1 reseller is listed there?
I only have 1 ip adresses in this server but multiple domains and multiple reseller names.
I checked this file against a backup and the contents are the same.

HTML:
 vi /etc/httpd/conf/ips.conf

        
<VirtualHost IP:80>
        ServerName shared.domain
        ScriptAliasMatch ^/~([^/]+)/+cgi-bin/+(.*) /home/$1/public_html/cgi-bin/$2
        AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
        DocumentRoot /home/socialtime/domains/sharedip

        SuexecUserGroup aRESELLERNAME aRESELLERNAME

        CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>


<VirtualHost IP:443>
        SSLEngine on
        SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
        SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key


        ServerName shared.domain
        ScriptAliasMatch ^/~([^/]+)/+cgi-bin/+(.*) /home/$1/public_html/cgi-bin/$2
        AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
        DocumentRoot /home/aRESELLERNAME/domains/sharedip

        SuexecUserGroup aRESELLERNAME aRESELLERNAME

        CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>
 
Hello,

try this

Code:
cd /usr/loca/directadmin/custombuild
./build update
./build rewrite_confs

and restart apache. Also make sure you've got not empty /etc/httpd/conf/ips.conf with all of your IPs inside.

It's fixed!
I created a backup of the new system, compared all the files from a backup i made before upgrading.
Downloaded everything, unpacked it and made a file compare.

Turned out ips.conf was missing 2 lines:

NameVirtualHost IP:80
NameVirtualHost IP:443

The rest of the information was still there so i didn't notice the problem after reading your post..
 
Too bad there is no Thanks button.

Thread is resolved. (I can't put that status on it myself)
 
Back
Top