httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] Configuring one static host and one Rails host-but can't get both to work
Date Fri, 02 Nov 2007 09:41:20 GMT
On Nov 2, 2007 10:00 AM, john asmodeus <sdc980@hotmail.com> wrote:
>
> I just got an email saying this message didn't make it through the spam
> filters, but when I came back to the site, it was there! So, I don't know...
> I guess I will check back tomorrow and if it's gone, I will try to post it
> again in a way that doesn't piss off your spambot.

I had a look at the link you gave us. What is wrong with your config
is that for namevirtual hosts to work as expected all the blocks must
be configured the same.

You have:

NameVirtualHost 192.168.0.119
<VirtualHost 192.168.0.119>
        ServerName Rails_app
        ServerAlias Rails_app
# rest of config snipped
</VirtualHost>

NameVirtualHost *:80
<VirtualHost *:80>
        ServerName HTML_site
        ServerAlias HTML_site
# rest of config snipped.
</VirtualHost>

But you probably should have:

NameVirtualHost *:80
<VirtualHost *:80>
        ServerName Rails_app
        ServerAlias Rails_app
# rest of config snipped
</VirtualHost>
<VirtualHost *:80>
        ServerName HTML_site
        ServerAlias HTML_site
# rest of config snipped.
</VirtualHost>

The "NameVirtualHost" statement tells your apache on which IP
address/port combination you want to have name based virtual hosts.
You then define these hosts with a succession of <virtualhost> blocks
that have the exact same IP address/port combination. The apache
server picks one of the virtual hosts by matchin the "host" header in
the http request with  ServerName or ServerAlias.

Krist

-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

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


Mime
View raw message