LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   apache reverse proxy (http://www.linuxquestions.org/questions/linux-networking-3/apache-reverse-proxy-102114/)

wildbob 10-09-2003 01:02 PM

apache reverse proxy
 
Hi,
I'm running apache on RH9 and need help with reverse proxy. I also have a networked web cam (built in web server on 192.x.x.x address). Let's say that my domain is xxx.yyy.zzz. I'd like requests for xxx.yyy.zzz/camera to go to the internally addressed webcam server. The Documentation that I've been able to find is confusing and I belive the proxy module names are different. Ok, so, I have apache running with only the stock installed modules and I'm not sure if the proxy modules are loaded by default. If somebody could let me know what modules need to be loaded and maybe a sample http.conf, ProxyPass setup...ReverseProxyPath setup. BTW--DSL(staticIP)-->Linux(IPMASQ)---->internal 192.168.0.x network...


THANKS,
WildBob

stickman 10-09-2003 02:11 PM

Have you looked at using mod_rewrite to do this?

wildbob 10-09-2003 02:35 PM

No stickman, I have not.
Being fairly new to LINUX, I am unsure of the proper approach, so I've not chosen a method yet. If there was a "linux School" I'd be on the short bus...Will mod_rewrite do the trick? If so, please point me to some docs or include some sort of sample http.conf so I can see what's going on. THANKS for the quick response!!!

stickman 10-09-2003 03:14 PM

The URL Rewriting Guide on the Apache site should give you enough examples to get you started.

wildbob 10-09-2003 06:30 PM

OK, Thanks.....

wildbob 10-09-2003 08:17 PM

Is it Dynamic Mirror that I want to use? Would this be correct:

RewriteEngine on
RewriteBase 192.168.0.8/
RewriteRule ^/(.*)$ http://x.y.z/camera$1 [P]

Remember http://x.y.z/camera is where I want people to go and the internal address is the camera.

Forgive me as I stumble through this..........

stickman 10-10-2003 08:46 AM

I would use a RewriteRule similar to:
RewriteRule ^/camara(.*) http://192.168.0.8/path/to/$1 [P,L]

where ^/camara(.*) is the match condition that gets proxied to the internal address. Anything after camara (ie .*) will be filled into $1. You may need to tinker with the match condition to get the effect you want.

wildbob 10-12-2003 04:06 PM

Hmmm..does this go in httpd.conf? I get this error:
httpd failed. The error was: Stopping httpd: [FAILED]

Starting httpd: Syntax error on line 893 of /etc/httpd/conf/httpd.conf:
RewriteBase: only valid in per-directory config files
[FAILED]

wildbob 10-15-2003 01:16 PM

still having trouble...anybody...anybody..bueler?..anybody?


All times are GMT -5. The time now is 11:42 PM.