[svlug] Port 80 forwarding

Gary Lin glin at employees.org
Fri Jul 30 01:10:26 PDT 2004


That is possible.. depending on what level the "forwarding" your ISP is 
using. The apache determine the domain name by looking at the "Host" 
header field in the HTTP request header. If your ISP is generating a 
different HTTP request than the original HTTP request when it forwards 
(or proxy?) to your web server, then it might explain why this happens. 
If you are familar with server side scripting using CGI or PHP, the 
easiest way is to use a cgi/php script to dump out the request header. 
Check to see what is the value of the "Host" request header.
Hope this helps,
-- Gary

skip evans wrote:

> Hey all,
>
> Re: problem I described below. (and yes, jeffersonvalleypresents.com 
> below is a typo. It is correctly typed .org in the httpd.conf file. 
> Thanks, Gary.)
>
> I think I've determined now that my first suspicion was right. My ISP 
> is not including the domain name with the forwarded http requests. I 
> did get the BSD box hooked up straight to the internet, sans router, 
> used a dialup connection on another box to hit and got the same 
> results. Whichever DocumentRoot appears first in the VirtualHost 
> blocks, hence the default, is delivered back, regardless of which 
> domain is used to issue the request.
>
> My question now is whether or not my ISP can even include the domain 
> name in the request.
>
> Anyone got any ideas? This is new terrority for both me and my ISP, so 
> he is probably not the best one to answer this question.
>
> Thanks a bunch,
>
> Skip
>
>
>> From: "skip evans" <skipevans2004 at hotmail.com>
>> To: svlug at lists.svlug.org
>> Subject: [svlug] Port 80 forwarding
>> Date: Fri, 30 Jul 2004 01:27:24 -0600
>>
>> Hey all,
>>
>> My ISP here in the little mountain town finally decided to forward 
>> port 80 on to me, in an attempt to make my server accessible. Here's 
>> the scenario...
>>
>> My Linksys BEFSR41 router is configured to his 192.168.0.29 subnet 
>> address, and my BSD box is set as 192.168.1.100 behind the router. He 
>> forwards port 80 requests to me, and I have the router forward them 
>> to the BSD box. All works well, except that I need to use virtual 
>> hosting under apache for a few different sites.
>>
>> In my httpd.conf file I have...
>>
>> ServerName venomouspenguin.com
>>
>> DocumentRoot /usr/local/apache/htdocs/vp/html
>>
>> And for the virtual hosting...
>>
>> NameVirtualHost *
>>
>> <VirtualHost *>
>> DocumentRoot /usr/local/apache/htdocs/vp/html
>> ServerName venomouspenguin.com
>> </VirtualHost>
>>
>> <VirtualHost *>
>> DocumentRoot /usr/local/apache/htdocs/jvp/html
>> ServerName jeffersonvalleypresents.com
>> </VirtualHost>
>>
>> Both domain names, venomouspenguin.com and 
>> jeffersonvalleypresents.org have their A records set to his static 
>> IP, where the http requests are forwarded from.
>>
>> The problem is requests to either domain names return the document 
>> root of whatever VirtualHost entry appears first, leading me to 
>> believe that maybe the domain names do not end up at my server, 
>> leaving Apache with no alternative but to use the default first 
>> entry. Even the DocumentRoot setting above the VirtualHost blocks 
>> makes no difference. It always uses the first entry in the 
>> VirtualHosts blocks.
>>
>> Does my suspicion sound correct?
>>
>> I tried to leave out the Linksys router and plug by BSD box directly 
>> into the internet, but that way I was unable to access the server 
>> through http at all. I did set its IP to the .29 number and to his 
>> default gateway, still no dice.
>>
>> Any help would be greatly appreciated. I can access the sites by 
>> removing VHing, but the theater company is pretty peeved it's taken 
>> this long to get their site up, and won't be happy when their snazzy 
>> new domain name doesn't work.
>>
>> Thanks,
>>
>> Skip Evans
>> A tired 1:30am in Mootown USA
>>
>> _________________________________________________________________
>> Discover the best of the best at MSN Luxury Living. 
>> http://lexus.msn.com/
>>
>>
>> _______________________________________________
>> svlug mailing list
>> svlug at lists.svlug.org
>> http://lists.svlug.org/lists/listinfo/svlug
>
>
> _________________________________________________________________
> Don’t just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
>
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug






More information about the svlug mailing list