On 01/27/2014 06:43 AM, Yan Seiner wrote:
I am trying to set up a simple mod_proxy: <VirtualHost *:80> ErrorLog "/var/log/apache2/wrt_error.log" LogLevel debug CustomLog "/var/log/apache2/wrt_access.log" combined ProxyPreserveHost On ProxyRequests Off ServerName xxx.com ServerAlias www.xxx.com ProxyPass /foo/ http://localhost:8002/ ProxyPassReverse /foo/ http://localhost:8002/ </VirtualHost>The problem I am having is that the server at localhost:8002 immediately issues a redirect to /cgi-bin, and I can't figure out how to handle that in the proxy:<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="refresh" content="0; URL=/cgi-bin/yyy" /> </head> <body style="background-color: black"><a style="color: white; text-decoration: none" href="/cgi-bin/yyy">redirected page</a></body> </html>I have several web servers at localhost:800?. The web servers at localhost:800? are embedded machines so I can't easily change the code.Any suggestions on how to proceed?
I should add that it works if I set up a virtual host for each localhost:800? machine, but that seems a bit overkill.
ProxyPass / http://localhost:8002/ <- works ProxyPass /foo/ http://localhost:8002/ <- fails at the redirect I want to have them accessible via www.xxx.com/server1 www.xxx.com/server2 ... rather than having to have the overhead of server1.xxx.com server2.xxx.com and so on. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx