LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   still trying to reverse proxy (http://www.linuxquestions.org/questions/linux-networking-3/still-trying-to-reverse-proxy-106298/)

wildbob 10-20-2003 10:44 AM

still trying to reverse proxy
 
I have a internal networked webcam (server built in) at IP address 192.168.0.x and I would like it to appear as a directory off my main server. So, if my main server is www.mydomain.com i would like requests for www.mydomain.com/camera to go to the internal webcam server at 192.168.0.x. Ok, so people said I should try mod_rewrite and I did this is the rule:

RewriteEngine on
RewriteBase 192.168.0.8/
RewriteRule ^/camara(.*) http://192.168.0.8/path/to/$1 [P,L]

but I get this error:
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]

What am I doing wrong? please help!

RH9 apache 2.0...

unSpawn 10-20-2003 04:37 PM

RewriteBase: only valid in per-directory config files
Is sposed to be injected in a dir's .htaccess file as far as I have read mod_rewrite.html.

wildbob 10-21-2003 08:19 AM

Ok, so the rewrite statements go in a .htaccess file and not httpd.conf?

stickman 10-21-2003 10:04 AM

Rewrite rules can be placed in httpd.conf. I've got several systems running in this config. You may need to place them inside of the <Directory> or <VirtualHost> paragraph of the config file. You can turn up the log level with mod_rewrite to get a better understanding of what is happening.

wildbob 10-21-2003 11:37 AM

Ok,
will I have to create a virtual host for this to work or is that where the rules just need to be.

wildbob 10-22-2003 01:38 AM

Hmmm..ok now I get this error:
httpd failed. The error was: Stopping httpd: [FAILED]

Starting httpd: Syntax error on line 1041 of /etc/httpd/conf/httpd.conf:
RewriteBase: argument is not a valid URL
[FAILED]

wildbob 10-28-2003 09:12 AM

Hmmm...apache starts when I remove the rewritebase rule....but 404 error trying to get to camera


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