Forum OpenACS Q&A: Re: reverse proxy via apache...

Collapse
Posted by David Kuczek on
Another thing: What are the pros and cons of apache, pound and squid... I only want to have virtual hosts running on my machine and aolserver's virtual hosts didn't really work...
Collapse
Posted by Peter Alberer on
Beginners Question: Where will I find the logfile that apache creates?

If you use a config file directive like the one mentioned above:
CustomLog logs/access_log combined
the logfile will be in APACHE_HOME/logs/access_log.

what do you mean with "rewrite rules"?

when one of the backend servers returns a http 302 status code the proxy and/or the backend server has to take care of the server/protocol it sends the browser to. If you have a website like www.test.com with backends www1.test.com, www2.test.com, www3.test.com all redirects should go to www.test.com and not directly to one of the backends. In addition the redirects should use the right protocol (http/https). Using ad_returnredirect (which returns to the host in the http location header) instead of ns_returnredirect seems to take care of the correct host. But if you use a ssl-reverse-proxy that connects to the backend server via http, aolserver will return a redirect to http and could miss the proxy (if it just listens to https). The proxy can rewrite this to use the right protocol.

The relevante directive for apache is proxypassreverse, Pound will do this automatically i think. I must admit i have not tried a lot of variations of apache functionalities (proxypass and url-rewriting can get rather complex) as we use pound for now.