Jump to content

Apache is loading the wrong dir?


tec

Recommended Posts

I had some people install a firewall on my server two days ago and they managed to mess up my server, everything was fixed except one!, every time i try to load any of my websites i get this:

 

index of /

 

awstats/

 

thats it!!!

 

I did check my /var/www/html and i found nothing, i found all the files in /var/www/vhosts

 

is the path is the problem? in my httpd.conf i have Directory set to /var/www/html, any one knows how to fix this problem?

 

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/69191-apache-is-loading-the-wrong-dir/
Share on other sites

It sounds like just changing the Directory in the httpd.conf should work. or renaming vhosts to html

 

Alternatively you can

ln -s /var/www/vhosts /var/www/html

 

to create a symbolic link - that way the sites will exist in both places.

 

cheers,

tdw

Okay i think what you need to do is specify the virtual hosts for each website with their full paths in httpd.conf

 

Something along the lines of:

 

<VirtualHost *>
        ServerAdmin [email protected]
        ServerName www.cysalsa.com
        ServerAlias cysalsa.com
        DocumentRoot /var/www/vhosts/cysalsa.com/
        <Directory /var/www/vhosts/cysalsa.com/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride AuthConfig
                Order allow,deny
                allow from all
        </Directory>
        LogLevel warn
</VirtualHost>

<VirtualHost *>
        ServerAdmin [email protected]
        ServerName www.votasoft.com
        ServerAlias votasoft.com
        DocumentRoot /var/www/vhosts/votasoft.com/
        <Directory /var/www/vhosts/votasoft.com/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride AuthConfig
                Order allow,deny
                allow from all
        </Directory>
        LogLevel warn
</VirtualHost>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.