Forum Moderators: phranque
I have it almost there. I can setup a reverse to say...
if I put /someplace on the end of the url to the webserver I am using as the reverse proxy. What I want to do is be able to put in:
www.someplace.com
and my reverse proxy get that from my internal webserver that is hosting that content.
www.someplace.com is a domain (fictional for this purpose) I have registered and will resolve to a real IP. Of course I only have one real IP.
Anyway, I have searched and searched and I cannot find the answer.
See the mod_rewrite RewriteRule [P] flag for the first method.
If you want to point both domains to the same virtual server, then your mod_rewrite rule would have to check the %{HTTP_HOST} variable so that only the back-end server's domain would be proxied.
Jim
Can you give me some more direction? Here is what I am trying todo:
www.frontend.com resolves to my real IP address
www.backend.com also resolves to my real IP address
for reasons that I cannot change the two "sites" are on two different webservers. I can only port forward my router to one of the webservers at a time. So what I need to do is setup the www.frontend.com server to reverse back to www.backend.com.
I have figured out how to use:
ProxyPass and ProxyReversePass so that I can go to www.frontend.com/backend to get to the backend webserver but that doesn't do me any good since people on the internet want to type in www.backend.com into their web browser...
Any help would be greatly appreciated. I would think my scenario is very basic but I am having the toughest time finding an answer.
John
frontend.com then reverse-proxies to the backend server using its local area network IP address, not a domain name.
I suppose you could configure the 'hosts' file on these machines so that they both treat backend.com is a LAN IP address. That might simplify things, or it might not...
If most of this is new to you, just take it slow and read a lot. Setting up this kind of configuration is NOT a beginner's project, it's an intermediate-to-advanced project, and will take some serious study. Step-at-a-time, you'll get there.
Jim
It does
<quote>frontend.com then reverse-proxies to the backend server using its local area network IP address, not a domain name.</quote>
This is the point of my problem. I can't find any documentation that tells me HOW to do it.
Quote from that link:
ProxyPass /foo [foo.example.com...]
ProxyPassReverse /foo [foo.example.com...]
this method just allows me to put /foo on the end of the URL for the frontend server to get to the backend server. I want to use the DNS name to get to the backend.
We're not set up here to 'give you the solution' -- mostly because we don't know all the details of your site, but partly because there are a limited number of contributors here. As a result, it's a "self-help" kind of thing. Specific questions are welcome, and we'll do our best to answer them.
Thanks,
Jim