Re: AW: Mangled my Virtual Hosts

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

 



> Christian Buczek wrote:
>>
>> *Von:* Joseph Morgan [mailto:josephmmorgan@xxxxxxxxxxx]
>> *Gesendet:* Donnerstag, 26. März 2009 03:21
>> *An:* users@xxxxxxxxxxxxxxxx
>> *Betreff:*  Mangled my Virtual Hosts
>>
>> I have somehow mangled my virtual hosts.. or so I think. I have two web
>> sites http://www.ProSportsResumes.com, and
>> http://www.VideoFortWorth.com, among others hosted on the same machine.
>> If you visit http://www.VideoFortWorth.com, you'll see
>> "ProSportsResumes" in the title, but the content of both are correct.
>>
>> My host machine is behind a router with port forwarding turned on. All
>> incoming traffic on port 80 is forwarded to this machine.
>>
>> The "hostname" command returns "WEBHOST"
>>
>> My hosts file has entries like:
>>
>> 127.0.0.1 localhost
>> 127.0.0.1 www.VideoFortWorth.com
>> 127.0.0.1 www.ProSportsResumes.com
>>
>> My httpd.conf has this line as it should:
>>
>> # Virtual hosts
>> Include conf/extra/httpd-vhosts.conf
>>
>> And my httpd-vhosts.conf has:
>>
>> NameVirtualHost 127.0.0.1:*
>>
>> ServerAdmin admin@xxxxxxxxxxxxxxxxxxxx
>> DocumentRoot X:/webs/ProSportsResumes
>> ServerName www.ProSportsResumes.com
>>
>>
>>
>> ServerAdmin admin@xxxxxxxxxxxxxxxxxx
>> DocumentRoot X:/webs/VideoFortWorth
>> ServerName www.VideoFortWorth.com
>>
>>
>> Any ideas are appreciated.
>> Joe Morgan
>>
>>
----------------------------------------------------------------------------------------------------------------
>>
>>
----------------------------------------------------------------------------------------------------------------
>>
>> Hi Joe,
>>
>> I´m not sure, but I mean you must enter another IP for your 
>> NameVirtualHost.
>>
>> So your Domain has the public IP .64.202.189.170. That’s the router 
>> with port forwarding to your webserver in a non-public net (like 
>> 10.0.0.x / 192.168.0.y / ..)
>>
>> If your webserver have the IP 10.0.0.5, for example, you has to be 
>> entered this IP for NameVirtualHost.
>>
>> Another idea is to catch all incoming requests on this webserver like 
>> in this config:
>>
>> ..
>>
>> DocumentRoot (anyPath)
>>
>> ServerName www.ProSportsResumes.com
>>
>> ServerAdmin (anyMailAddy)
>>
>> ErrorLog (anyPath)
>>
>> CustomLog (anyPath)
>>
>> ..
>>
>> Hope one of these ideas works,
>>
>> Greats,
>>
>> Christian Buczek
>>-------------------------------------------------------------------
> 
> On Thu, 26 Mar 2009 09:24:22 -0500, Joseph Morgan
<josephmmorgan@xxxxxxxxxxx> wrote:
> OK... will try that when I get back to the office... Will this IP need 
> to be in my hosts file as well? That is, instead of (or in addition to):
> 
> 127.0.0.1 localhost
> 127.0.0.1 www.VideoFortWorth.com
> 127.0.0.1 www.ProSportsResumes.com
> 
> I should have:
> 
> 127.0.0.1 localhost
> 192.168.x.x www.VideoFortWorth.com
> 192.168.x.x www.ProSportsResumes.com
> 
> ??
> -------------------------------------------------------------------

Usually it doesn´t matter, what in your hosts - file stands. It only
matter, if you want to test your apache on the server itselfs (and if the
server has no internetconnection).

Why?
This is the normal way to connect from anywhere to your webserver:
1) I type 'www.ProSportsResumes.com' into internetbrowser
2) my PC lookup for IP for this URL (normally over DNS): it´s
64.202.189.170
3) my PC connect over port 80 to 64.202.189.170
4) 64.202.189.170 is a router an forward this http-request to real
webserver --> 192.168.x.y
   - by forwarding IP address changes, but 'www.ProSportsResumes.com' in
http-header unchanged
5) your apache listen on 192.168.x.y:80 for 'www.ProSportsResumes.com'
(this stands in vhosts.conf) and reserve http-request

In this (normal) case there´s no need for any entry in hosts.

greats
chris


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