Pregunta

I have the following vhosts setup:

<VirtualHost *:80>
    ServerAdmin admin@localhost.com
    DocumentRoot "C:\Apache24\htdocs"
    ServerName localhost
</VirtualHost>

<VirtualHost cake-photos.com:80>
    ServerAdmin admin@localhost.com
    DocumentRoot "C:\Apache24\htdocs\cake-photos"
    ServerName cake-photos.com
    ServerAlias *.cake-photos.com
    <Directory "C:\Apache24\htdocs\cake-photos">
    Options Indexes FollowSymLinks
    AllowOverride all
Require ip 127.0.0.1
    </Directory>
</VirtualHost>

<VirtualHost fangwear.co.uk:80>
    ServerAdmin admin@localhost.com
    DocumentRoot "C:\Apache24\htdocs\Fangwear 2014"
    ServerName fangwear.co.uk
    ServerAlias www.fangwear.co.uk
    <Directory "C:\Apache24\htdocs\Fangwear 2014">
    Options Indexes FollowSymLinks
    AllowOverride all
     #   Require all granted
Require ip 127.0.0.1
    </Directory>
</VirtualHost>

<VirtualHost manager.com:80>
    ServerAdmin admin@localhost.com
    DocumentRoot "C:\Apache24\htdocs\Manager 2014"
    ServerName manager.com
    ServerAlias www.manager.com
    <Directory "C:\Apache24\htdocs\Manager 2014">
    Options Indexes FollowSymLinks
    AllowOverride all
    #    Require all granted
Require ip 127.0.0.1
    </Directory>
</VirtualHost>

None of it seems to be working and if I try to go to any of these I end up being redirected to the cake-photos.com vhost.

I need to be able to get to other things too such as localhost/phpmyadmin but that won't work with this configuration.

Where am I going wrong?

¿Fue útil?

Solución

Did you set up your hosts file? On Unix Systems /etc/hosts? And did you restart your server?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top