[Seaside] ProxyPass and the P Option

John Thornborrow john at pinesoft.co.uk
Mon Nov 5 16:05:03 UTC 2007


Hi,

Here is an example vhost setup from one of the servers I am running with
apache2:

<VirtualHost *:80>
				#I've removed web address,
  ServerName xxx.xxx.xxx	#normally this would be a domain
				#such as www.google.com
  ProxyRequests Off
  ProxyPreserveHost On

  <Location /files>
    ProxyPass http://127.0.0.1:9090/seaside/files/FVFiles/
    ProxyPassReverse http://127.0.0.1:9090/seaside/files/FVFiles/
  </Location>

  <Location /images>
        ProxyPass !
  </Location>

  <Location /tinymce>
        ProxyPass !
  </Location>

  <Location />
    ProxyPass http://127.0.0.1:9091/seaside/fv/
    ProxyPassReverse http://127.0.0.1:9091/seaside/fv/
  </Location>

</VirtualHost>


Hope this helps,
John

www.pinesoft.co.uk

Richard Eng wrote:
> 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
> 
> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 
> 
>  
> 


Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA



This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com



More information about the seaside mailing list