PDA

View Full Version : Fedora 6 - Apache 2 - phpmyadmin Vhost problem


Gable
13th November 2007, 05:13 PM
Hello all,

I have a fresh install of FC6, with Apache 2/php5/mysql/phpmyadmin etc.

I have two vhosts working

/var/www/vhost1.com/
/var/www/vhost2.com/

I installed phpmyadmin and moved the directory to

/var/www/vhost1.com/dbadmin/

I cannot browse to http://vhost1.com/dbadmin/

I get permissions denied. The permissions are 755 on that dir, and the owner/group is apache:apache, I also tried root:root.

I can comment out the vhosts portion of my httpd.conf, and move /var/www/vhost1.com/dbadmin/ to /var/www/html/dbadmin/ and browse to the dir:

http://vhost1.com/dbadmin/

Error log just states I don't have permission to access it when its under the vhost config.

Please advise, and thank you in advance..

Gable

zilch321
13th November 2007, 06:17 PM
No idea what to tell you without seeing the full virtual host portion of your configuration. The answer is in there. Might be useful to post it for us.

Gable
13th November 2007, 06:54 PM
No idea what to tell you without seeing the full virtual host portion of your configuration. The answer is in there. Might be useful to post it for us.


<VirtualHost *>
ServerAdmin root@localhost
DocumentRoot /var/www/vhost1.com
ServerName vhost1.com
ErrorLog logs/vhost1.com-error_log
CustomLog logs/vhost1.com-access_log common
</VirtualHost>

<VirtualHost *>
ServerAdmin root@localhost
DocumentRoot /var/www/vhost2.com
ServerName vhost2.com
ErrorLog logs/vhost2.com-error_log
CustomLog logs/vhost2.com-access_log common
</VirtualHost>

zilch321
13th November 2007, 07:33 PM
At minimum here you are missing a server name for directive in each of those sections. We should be seeing something like :

<VirtualHost *>
ServerName vhost1.whatever.com

If you dont define the server name for your vhosts apache is likely going to be confused as to handle the request. When you do away with the vhosts it doesnt have to make a choise as to which Document root to send you to.

Vhosts are dependent on resolving DNS to make sure your local lan can resolve your vhost server names before you start testing.

Janesville - Lunglei - Penaflor