Re: Configuring one static host and one Rails host-but can't get both to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 2, 2007 10:00 AM, john asmodeus <sdc980@xxxxxxxxxxx> 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@xxxxxxxxx
krist@xxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux