Google Answers Logo
View Question
 
Q: Hostname forward ( No Answer,   2 Comments )
Question  
Subject: Hostname forward
Category: Computers > Internet
Asked by: salman1-ga
List Price: $10.00
Posted: 16 Feb 2004 23:05 PST
Expires: 01 Mar 2004 11:40 PST
Question ID: 307552
At this moment, any requests to: www.setcomputing.com is served by my
personal Linux machine with Apache (machine name: setcomputing). What
I want to be able to do is the following: when a user types:
dev.setcomputing.com I want to be able to forward this request to a
windows machine (singularity).

My setup is the following. Both setcomputing and singularity are
connected using a NETGEAR RP614 router. Each machine therefore is
assigned a private IP address. What I want to do is any requests to:
dev.setcomputing.com to be forwarded to 192.168.0.2 (singularity or
the windows machine).

NOTE: The primary web-server is: Apache.

Is this possible? I know how to setup VirtualHosts which can map
hostnames to Directories but is mapping from hostnames to IP addresses
(or machines) possible? The solution must be interenet based not
intranet.

Since this is a rather complicated issue, I may not have been as
succinct as I would like to be; so please let me know if you have any
questions.

Request for Question Clarification by mosquitohawk-ga on 17 Feb 2004 17:39 PST
I don't know the answer to this question, but you may consider
visiting http://www.webhostingtalk.com/ for solutions.

Clarification of Question by salman1-ga on 22 Feb 2004 00:56 PST
brunson-ga,

After several tries I couldn't get ProxyPass to work. No matter what I
try. It just doesn't work. dev.setcomputing.com still goes to the
main-page (where WWW points to). I tried several other things, one
rather than dev.setcomputing.com I tried it with a folder like:
http://www.setcomputing.com/test to go to: http://192.168.0.2
(internal IP). So this is what I did:

(this is almost at the top of the .conf file, I don't know if that matters).

ProxyPass /test/ http://192.168.0.2
ProxyPassReverse /test/ http://192.168.0.2

(when I type: www.setcomputing.com/test/, I get a 404 message).

I loaded mod_proxy.so using:
LoadModule proxy_module modules/mod_proxy.so

Finally I uncommented:
<IfModule mod_proxy.c>
ProxyRequest Off

<Proxy *>
   Order deny,allow
   Allow from all
</Proxy>
</IfModule>

I don't see what's going on. A little help would be appreciated.

Thanks,
Answer  
There is no answer at this time.

Comments  
Subject: Re: Hostname forward
From: brunson-ga on 21 Feb 2004 00:42 PST
 
This can be accomplished using the reverse proxy capabilities of
mod_proxy.  Update your DNS zone to include dev.setcomputing.com and
have it resolve to the address of your routers public interface so
both dev and www point to it.

Then, in your apache config (after loading the module) include the following:

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass http://dev.setcomputing.com http://localname
ProxyPassReverse http://localname http://dev.setcomputing.com


Fairly straightforward.
Subject: Re: Hostname forward
From: majortom-ga on 22 Feb 2004 07:59 PST
 
I am doing this successfully for many sites using blocks like this:

<VirtualHost *>
    ServerName dev.setcomputing.com
    ProxyPass / http://192.168.0.2/
    ProxyPassReverse http://192.168.0.2/    
    <Location />
         order allow,deny
         allow from all
     </Location>
</VirtualHost>

Give that a try; it's certainly working for me. I assume you have done 
"AddModule mod_proxy.c" as well, and LoadModule if you are loading it
dynamically.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy