You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by NetGert <ne...@hotmail.com> on 2004/01/17 14:37:46 UTC

[users@httpd] Virtual hosts

Hi

I have a static DNS gnet.gotdns.com which resolves to my router's IP
address, which routes port 9000 to my machine in the LAN. Now, when I enter
http://gnet.gotdns.com:9000 I can get to my site but I want to make a
virtual host, like http://admin.gnet.gotdns.com:9000 for administration.
I've tried many combinations but can't find the working one. I
either get the default web or virtual host's web, whatever I type before
".gnet.gotdns.com".


---------------------------------------------------------------------
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 hosts

Posted by NetGert <ne...@hotmail.com>.
got it working by using
NameVirtualHost *
<VirtualHost *>
    ServerName gnet.gotnds.com
</VirtualHost>
<VirtualHost *>
    ServerName admin.gnet.gotnds.com
</VirtualHost>
of course the vhosts had other content besides that, but that's the main
thing... before i tried to use
NameVirtualHost *
<VirtualHost gnet.gotdns.com>
    ServerName gnet.gotnds.com
</VirtualHost>
<VirtualHost admin.gnet.gotdns.com>
    ServerName admin.gnet.gotnds.com
</VirtualHost>
(and many different versions of it) which seemed more logical, but didn't
work
----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Tuesday, January 20, 2004 11:43 AM
Subject: Re: [users@httpd] Virtual hosts


> NetGert wrote:
> > I have a static DNS gnet.gotdns.com which resolves to my router's IP
> > address, which routes port 9000 to my machine in the LAN. Now, when
> > I enter http://gnet.gotdns.com:9000 I can get to my site but I want to
> make
> > a virtual host, like http://admin.gnet.gotdns.com:9000 for
administration.
> > I've tried many combinations but can't find the working one. I
> > either get the default web or virtual host's web, whatever I type before
> > ".gnet.gotdns.com".
>
> Do you have this directive before your vhosts?
>
>     NameVirtualHost *:9000
>
> Or, does the router route port 9000 to port 80? If so, disregard the above
> (although you still need a NameVirtualHost directive), and post your vhost
> configuration.
>
> Regards,
> Robert Andersson
>
>
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] Virtual hosts

Posted by Robert Andersson <ro...@profundis.nu>.
NetGert wrote:
> I have a static DNS gnet.gotdns.com which resolves to my router's IP
> address, which routes port 9000 to my machine in the LAN. Now, when
> I enter http://gnet.gotdns.com:9000 I can get to my site but I want to
make
> a virtual host, like http://admin.gnet.gotdns.com:9000 for administration.
> I've tried many combinations but can't find the working one. I
> either get the default web or virtual host's web, whatever I type before
> ".gnet.gotdns.com".

Do you have this directive before your vhosts?

    NameVirtualHost *:9000

Or, does the router route port 9000 to port 80? If so, disregard the above
(although you still need a NameVirtualHost directive), and post your vhost
configuration.

Regards,
Robert Andersson


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