View previous topic :: View next topic |
Author |
Message |
Vlad Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 09 Apr 2002 Posts: 264 Location: San Diego, California
|
Posted: Fri Apr 14, 2006 9:10 pm Post subject: Permitting external access to a firewalled port via apache |
|
|
Hey guys,
I have a daemon serving webpages on the localhost of a server, port 7000. I'd like both internal and external clients to access it via apache. Clients can reach the server *only* by ports 80 and 443. I've tried searching the forums but I'm not really sure what to search for so my searches have been fruitless.
The problem I'm having seems common enough but I haven't had any luck getting the suggested solutions working. At first someone pointed me towards using mod_rewrite, but this clearly wont work as rewriting the URL from http://server to http://server:7000 will just cause the requests to be dropped by the firewall. Another solution was to use mod_proxy, but that also doesn't seem to work. I thought ProxyRemote would do the trick but it did nothing. iptables solutions seem ineffective as I need to maintain the request path so as to not interfere with the rest of the web server traffic. Preferably, I'd like to keep it hostname independent: The server is NATed and the FQDN used to access it is not the same as it's internal network name.
So, does anyone know how I can get apache to take traffic from a local port and send it to a client as if it were inside of apache?
Here's a little schematic of what I'm trying to do:
[CLIENTS] [ SERVER ]
Client request [http://server/pcs] ----> [httpd port 80] <-> [pcsd port 7000]
Server responds by serving content from the pcsd daemon on port 7000 and is transparently seen as content from URL http://server/pcsd
Thanks for the help! If you need any more information please let me know.
Vlad |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eldad Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/89939820644417a9749313.jpg)
Joined: 26 Jan 2006 Posts: 45 Location: Israel
|
Posted: Fri Apr 14, 2006 10:04 pm Post subject: |
|
|
mod_proxy is the way to go.
ProxyRass /srv7000/ http://server:7000
and then you access the root of the server that is hosted on port 7000 as http://server/srv7000/
simple, and works like a charm. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Vlad Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 09 Apr 2002 Posts: 264 Location: San Diego, California
|
Posted: Sat Apr 15, 2006 4:10 am Post subject: |
|
|
This is exactly what I needed. With a little bit of trickery I managed to get exactly what I needed. Thanks a ton!
Vlad |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|