[Seaside] ProxyPass and the P Option

Richard Eng richard.eng at rogers.com
Mon Nov 5 13:44:24 UTC 2007


As I understand it, if you use the ŒP¹ option in the rewrite rule, you don¹t
need ProxyPass. But for me, this simply isn¹t true.

Here¹s my httpd.conf file:


LoadModule  proxy_module  /usr/lib/apache2/modules/mod_proxy.so
LoadModule  proxy_http_module  /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule  rewrite_module  /usr/lib/apache2/modules/mod_rewrite.so
LoadModule  ssl_module  /usr/lib/apache2/modules/mod_ssl.so

ServerName www.mydomain.com

NameVirtualHost 192.168.1.101:80

<VirtualHost 192.168.1.101:80>
RewriteEngine       on
ProxyRequests       off
DocumentRoot        /var/www
RewriteCond         %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule  ^/(.*)$  https://%{SERVER_NAME}/$1 [L,R]
</VirtualHost>

NameVirtualHost 192.168.1.101:443

<VirtualHost 192.168.1.101:443>
RewriteEngine       on
ProxyRequests       off
SSLEngine           on
SSLCertificateFile  /etc/apache2/ssl/apache.pem
DocumentRoot        /var/www/ssl
#ProxyPass           /seaside/go  http://localhost:9090/seaside/go
#ProxyPassReverse    /seaside/go  http://localhost:9090/seaside/go
RewriteRule  ^/$  http://localhost:9090/seaside/go/$1 [P,L]
</VirtualHost>


With the ProxyPass and ProxyPassReverse directives uncommented, this
configuration works like a charm. However, if they are commented out, then I
get the following weird behaviour:

If I click on a menu item in the browser, I get

https://localhost:9090/seaside/go?_k=IJjENelR&_s=jSDbFwqLpajXQQVf

...instead of

https://www.mydomain.com/seaside/go?_k=IJjENelR&_s=jSDbFwqLpajXQQVf


This screws up my application.

The question is, why is this happening? Why isn't the P option working?

Thanks,
Richard




More information about the seaside mailing list