You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Albert Vila <av...@imente.com> on 2004/11/29 09:18:53 UTC

[users@httpd] Virtual Host problem

Hi all,

 I'm running the Apache 1.3.29 under FreeBSD. I've got the following 
virtualhost set-up:

    Listen 80
    Port 80
    NameVirtualHost xx.xx.xx.xx:80

    <VirtualHost xx.xx.xx.xx>
       ServerName www.mydomain.com
       ServerAlias xx.xx.xx.xx
       User www-data
       Group www-data

       DocumentRoot /my/path
    </VirtualHost>

    <VirtualHost xx.xx.xx.xx>
       ServerName dev.mydomain.com
        User www-data
        Group www-data
       
        DocumentRoot /my/dev/path
      </VirtualHost>

  
   I know I have the DNS propertly setup, but I still cannot acces to 
dev.mydomain.com. I can only access to my main page (www.mydomain.com). 
The virtualHost configuration is in another file, I use the Include 
directive to add it to the httpd.conf. Am I doing something wrong?

Thanks in advance.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual Host problem

Posted by "Ivan Barrera A." <Br...@Ivn.cl>.
If you use NameVirtualHost xx.xx.xx.xx:80 you MUST use <VirtualHost 
xx.xx.xx.xx:80>

That's all :o)


Albert Vila wrote:
> Hi all,
> 
> I'm running the Apache 1.3.29 under FreeBSD. I've got the following 
> virtualhost set-up:
> 
>    Listen 80
>    Port 80
>    NameVirtualHost xx.xx.xx.xx:80
> 
>    <VirtualHost xx.xx.xx.xx>
>       ServerName www.mydomain.com
>       ServerAlias xx.xx.xx.xx
>       User www-data
>       Group www-data
> 
>       DocumentRoot /my/path
>    </VirtualHost>
> 
>    <VirtualHost xx.xx.xx.xx>
>       ServerName dev.mydomain.com
>        User www-data
>        Group www-data
>              DocumentRoot /my/dev/path
>      </VirtualHost>
> 
>  
>   I know I have the DNS propertly setup, but I still cannot acces to 
> dev.mydomain.com. I can only access to my main page (www.mydomain.com). 
> The virtualHost configuration is in another file, I use the Include 
> directive to add it to the httpd.conf. Am I doing something wrong?
> 
> Thanks in advance.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org