Apache's default document root not working
I have just installed and configured Apache on our new Linode which runs CentOS 6.
I also configured virtual hosts and it is working fine.
I have also installed and configured MySQL and PHP.
However, I have uploaded some applications like mysql to the default apache document root:
/var/www/html
but navigating via our server's IP this way:
brings up:
"Not Found
The requested URL /phpmyadmin was not found on this server."
almost as if it is not calling up the default apache document root.
Could I have been doing something wrong?
To my undersanding, virtual hosts should not affect the default document root. Is this thinking right?
Thanks in advance for your help.
5 Replies
Here's what the VirtualHost section of my Apache configuration file looks like:
DocumentRoot /var/www/vhosts/mysite1.com/httpdocs/
ServerName mysite1.com
ServerAlias
ErrorLog logs/mysite1.com-error_log
CustomLog logs/mysite1.com-access_log common
DocumentRoot /var/www/vhosts/mysite2.com/httpdocs/
ServerName mysite2.com
ServerAlias
Thanks.
It seems to be working fine now…
Here's what the virtual host section of my httpd.conf file now looks like:
DocumentRoot /var/www/html/
ServerName localhost
ServerAlias
ErrorLog logs/localhost-error_log
CustomLog logs/localhost-access_log common
DocumentRoot /var/www/vhosts/mysite1.com/httpdocs/
ServerName mysite1.com
ServerAlias
ErrorLog logs/mysite1.com-error_log
CustomLog logs/mysite1.com-access_log common
DocumentRoot /var/www/vhosts/mysite2.com/httpdocs/
ServerName mysite2.com
ServerAlias
However, what did you mean by "if you're using the sites-enabled directory structure, make the file come first in alphabetical order when you do an 'ls'."?
How does that work (i.e a site enabled directory structure)?
Thanks a lot for your help.
Regards,