Virtual hosts and phpmyadmin

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>

Any help?

Did you modified you windows hosts file also? I see you only want to access them locally.

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>

No one?:shifty:

I’m sorry but I’m out of ideas. Maybe try to make the path relative to the www directory. something like

Alias /phpmyadmin “…/apps/phpmyadmin3.1.1/”

popo,

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).

Regards,

DK

Ok. I have created a virutal host for phpmyadmin.

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>
127.0.0.1 phpmyadmin

popo,

404 is an missing page which indicates to me that the configuration isn’t setup for its own domain and the URIs are absolute (relative to localhost).

Regards,

DK

I am so stupid.:mad:
The phpmyadmin url was wrong. It was “C:/wamp/apps/phpmyadmin3.1.1” instead of “C:/wamp/apps/phpmyadmin3.1.3.1”

Now everything seems to be working.:smiley:

popo,

:tup: Don’t pet the sweaty stuff! $#!t happens! Thanks, though, for letting us know it’s resolved.

Regards,

DK