Hi.
I am trying to configure some virtual hosts in my localhost apache server and they seem to work.
The problem is that i can´t access to phpmyadmin. It gives an 403 forbiden error.
I am using wamp.
Here is my httpd-vhosts.conf:
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
<VirtualHost 127.0.0.1>
DocumentRoot C:\\wamp\\www
ServerName localhost
ServerAlias localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot H:\\Websites\\Testing\\wordpress
ServerName wordpress
ServerAlias wordpress
</VirtualHost>
<Directory H:\\Websites\\Testing\\wordpress>
Order Deny,Allow
Allow from all
</Directory>
I have add 127.0.0.1 wordpress line into hosts file.
I have managed to fix the 403 error by change the permissions of wamp directory in httpd.conf.Now i am geting 404 error.
If i put localhost in browser it shows the wamp index page and if i wrote wordpress it goes to the correct directory so the virtual hosts are working.
Note that the wamp server path is c:\wamp, the apache path is c:\wamp\bin\apache and phpmyadmin is c:\wamp\apps\phpmyadmin.
without virtual hosts, phpmyadmin url is localhost/phpmyadmin.
Maybe i need to change something in phpmyadmin.conf.
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.1.1/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#
<Directory "c:/wamp/apps/phpmyadmin3.1.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
You have not created a VH for phpmyadmin so I’m not sure what you’re asking for. You’ve done it correctly (httpd-vhosts.conf and hosts) so just do the same for PMA (phpmyadmin) using its physical address (using /'s, not \'s).
Results:
-I can acess to phpmyadmin but when i try to create a db in gives a 404 error.
-The alias localhost/phpmyadmin still doesn´t work.
<VirtualHost *:80>
DocumentRoot "C:/wamp/apps/phpmyadmin3.1.3.1"
ServerName phpmyamdin
ServerAlias phpmyamdin
<Directory "C:/wamp/apps/phpmyadmin3.1.3.1">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>