You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Almberg <ja...@identry.com> on 2003/02/21 17:14:40 UTC

[users@httpd] Virtual host questions . . .

I'm sure these are very common questions, so if there is a web page that 
answers them, please feel free to direct me to it . . .

I'm trying to set up apache 1.3.12 on Linux using my cable modem, 
linksys router, and an dynamic DNS service. I've got the basic 
configuration working using port 431 (my cable company blocks port 80) . 
. . you can see a test page at: www.beyondtranslations.com.

Now I'm trying to add name-based virtual hosting. I've been studying a 
couple books, but nothing seems to work. I always get the default test 
page. Here's what I *think* should work:

Listen 431
NameVirtualHost *

<VirtualHost *>
ServerName www.beyondtranslations.com
DocumentRoot /var/www/html/bt
</VirtualHost>

In the error log I get:

[warn] NameVirtualHost * has no VirtualHosts


I've tried several variations on this theme, including using the ip 
address of the machine, including the port number  (like *:431 or 
192.168.1.102:431), etc, but no luck.

The dynamic DNS service translates www.beyondtranslations.com to 
ww2.beyondtranslations.com:431, so I suspect that is part of the 
problem, but no idea what to do with that information!

I'm sure I'm missing the combination that works, or missing some key 
ingriedient. Any hints much appreciated!

Brgds: John




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

Posted by John Almberg <ja...@identry.com>.
Thanks Joshua and Rich. Between the two of you, I got it working. I 
needed to use the ip address of my machine (instead of *), add the port 
address, and use ww2.beyondtranslations.com as the server name.

-- John

Joshua Slive wrote:

>>>I'm trying to set up apache 1.3.12 on Linux using my cable modem,
>>>      
>>>
>
>Not also that this is an incredibly old version of apache that does not
>support "NameVirtualHost *" at all.
>
>
>Joshua.
>
>---------------------------------------------------------------------
>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
>
>
>  
>

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~
Identry, LLC
www.identry.com
jalmberg@identry.com



Re: [users@httpd] Virtual host questions . . .

Posted by Joshua Slive <jo...@slive.ca>.
> > I'm trying to set up apache 1.3.12 on Linux using my cable modem,

Not also that this is an incredibly old version of apache that does not
support "NameVirtualHost *" at all.


Joshua.

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

Posted by Rich Bowen <rb...@rcbowen.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 21 Feb 2003, John Almberg wrote:

> I'm sure these are very common questions, so if there is a web page that
> answers them, please feel free to direct me to it . . .

Many vhost questions can be answered by looking at the Apache vhost
docs, at http://httpd.apache.org/docs/vhosts and, in particular, the
examples document.

> I'm trying to set up apache 1.3.12 on Linux using my cable modem,
> linksys router, and an dynamic DNS service. I've got the basic
> configuration working using port 431 (my cable company blocks port 80) .
> . . you can see a test page at: www.beyondtranslations.com.
>
> Now I'm trying to add name-based virtual hosting. I've been studying a
> couple books, but nothing seems to work. I always get the default test
> page. Here's what I *think* should work:
>
> Listen 431
> NameVirtualHost *

Because you are on port 431, you probably want
NameVirtualHost *:431

>
> <VirtualHost *>

And here, you would then have
<VirtualHost *:431>

> ServerName www.beyondtranslations.com
> DocumentRoot /var/www/html/bt
> </VirtualHost>
>
> In the error log I get:
>
> [warn] NameVirtualHost * has no VirtualHosts
>
>
> I've tried several variations on this theme, including using the ip
> address of the machine, including the port number  (like *:431 or
> 192.168.1.102:431), etc, but no luck.

Ah. Hmm. Well, that's unexpected.

> The dynamic DNS service translates www.beyondtranslations.com to
> ww2.beyondtranslations.com:431, so I suspect that is part of the
> problem, but no idea what to do with that information!

The ServerName in the <VirtualHost> Section needs to match the name that
the server is accessed as, or you will get the default (in this case,
first-listed) virtual host. So, based on this information, you almost
certainly need

ServerName ww2.beyondtranslations.com

in your vhost section.

- -- 
And everyone said, "If we only live,
We too will go to sea in a Sieve -
To the hills of the Chankly Bore!"
 (The Jumblies, by Edward Lear)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.75-6

iD8DBQE+VlKNXP03+sx4yJMRAo/gAJ0ZkQNbVVJP85USHOqPyhY5batYdgCeIAEb
AumEW228xePdDc6LRpuKUXw=
=K4mO
-----END PGP SIGNATURE-----


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