views:

356

answers:

4

I have a plone zinstance set up through Apache Proxy on OS X Server 10.5. The server is set up with a single vhost on port 80, with Proxy & Proxypass directives to the Plone zinstance:

        ProxyPass / http://localhost:8080/VirtualHostBase/http/server:80/Plone/VirtualHostRoot/
        ProxyPassReverse / http://localhost:8080/VirtualHostBase/http/server:80/Plone/VirtualHostRoot/

However, I have some static HTML and PHP content that I want to display in an iframe via the plone site. I'm thinking I'll need to set up another vhost on a different port, then just specify the port # inline?

+1  A: 

Set up a static URL that will not be proxied but served from Apache directly, like this:

ProxyPass /static !
ProxyPass / http://localhost:8080/VirtualHostBase/http/server:80/Plone/VirtualHostRoot/
ProxyPassReverse / http://localhost:8080/VirtualHostBase/http/server:80/Plone/VirtualHostRoot/

Then configure /static to contain your static content.

Eemeli Kantola
A: 

Sorry, not enough information but I'll offer a couple of comments that might help point you in the right direction.

First, ProxyPassReverse is unnecessary as Plone already takes care of fixing up any self-referential urls. That is the point of the crazy url after all.

Another poster already showed how to configure ProxyPass to selectively bypass the proxy to Plone and serve from Apache directly.

Regarding the "additional vhost on port 8888". It's not clear what you mean by this. What is the extra vhost serving? If it's where your static html and php content is supposed to come from then restricting to localhost only means you're going to have to also configure an internal proxy to reach it. You can do that with Rewrite rules but that seems like an overly-complicated way to go in this usecase. Why is this vhost available to localhost only? For that matter, why are using a separate vhost... you can do this all (Plone, static files, and PHP) in just one vhost with the appropriate ProxyPass lines (or Rewrite lines if you need more flexibility).

A: 

I'd recommend rolling your configuration into a virtual host block. You can deliver static content directly form apache by rewriting a specific path. Here's an example

<VirtualHost *:80>
  ServerName yoursite.com
  Alias /static /var/www/some/path/

  <Directory "/var/www/some/path">
    Options Includes FollowSymLinks
    AllowOverride All
  </Directory>

  # Zope rewrite.
  RewriteEngine On
  RewriteRule /static - [L]
  RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{SERVER_NAME}:80/Plone/VirtualHostRoot/$1 [L,P]
</VirtualHost>
siebo
I'm still on the fence about whether to use a rewrite rule or proxypass
churnd
A: 

Hi!

I have a setup exactly like this but instead of accessing static data I want to open a connection from my Plone Server to an Internal server that provides some information for my users. How can I achieve this?

Thanks for the help!

I guess using iframes? You need to allow it in your Site Settings - HTML Filtering panel: http://plone.org/documentation/faq/tags-filtered
churnd