Page 1 of 1

Virtualhost problems

PostPosted: 25. February 2013 07:38
by svt.raiden
I have similar problem.
here is my configuration:

Code: Select all
### SK COnsult ###
<VirtualHost *:80>
    ServerAdmin some.email@gmail.com
    DocumentRoot "D:\workspace\web-projects\zend\skconsultproject\skconsult\public"
    ServerName skconsult/
    ##ServerAlias skconsult
    ErrorLog "logs/skconsult-error.log"
    CustomLog "logs/skconsult-access.log" combined
    LogLevel warn
    <Directory "D:\workspace\web-projects\zend\skconsultproject\skconsult\public">
        AllowOverride All
        Options Indexes FollowSymLinks
        Require all granted
    </Directory>
</VirtualHost>

### QC Eleven ###
<VirtualHost *:80>
    ServerAdmin some.email@gmail.com
    DocumentRoot "D:\workspace\web-projects\zend\qcelevenproject\qceleven\public"
    ServerName qceleven/
    ##ServerAlias qceleven
    ErrorLog "logs/qceleven-error.log"
    CustomLog "logs/qceleven-access.log" combined
    LogLevel warn
    <Directory "D:\workspace\web-projects\zend\qcelevenproject\qceleven\public">
        AllowOverride All
        Options Indexes FollowSymLinks
        Require all granted
    </Directory>
</VirtualHost>


No matter what I do - both skconsult/ and qceleven/ give me the skconsult project.
Any ideas?

[EDIT by Altrea: splitted from http://community.apachefriends.org/f/viewtopic.php?f=16&t=52774 - one thread per unique user and issue rule]

Re: Virtualhost problems

PostPosted: 25. February 2013 17:48
by JonB
I don't see a default vhost first - so I am going to guess that skconsult is being served really as the default (not because Apache can't tell them apart).

What exact URL's are you trying to access those folders with?

:?:

Re: Virtualhost problems

PostPosted: 25. February 2013 18:01
by Altrea
I don't know if this has anything to do with it, but AFAIK ServerName should not contain a trailing slash.

Re: Virtualhost problems

PostPosted: 25. February 2013 19:44
by JonB
I am definitely over-cranked, I saw that and didn't put it in as a possible cause, which would also fit with my theory of skconsult is being served as the default because both vhosts contain errors.

A look at the error log would help also

I need to get some of that sleep stuff :shock:

:mrgreen:

Re: Virtualhost problems

PostPosted: 25. February 2013 23:13
by Nobbie
Altrea wrote:I don't know if this has anything to do with it, but AFAIK ServerName should not contain a trailing slash.


You are right, of course this is wrong. A ServerName MUST NOT contain a slash, as it collides with the slash of a valid URL. A ServerName is neither a Path nor an URL and a trailing slash is simply wrong.