Plone CMS behind apache via mod_proxy, need bypass method

Discussion in 'Apache' started by mastafoo, Jul 24, 2009.

  1. #1
    Hello, I am using the Plone CMS with Zope for my website using port 80, but have multiple PHP scripts, large files, and HTML pages that I need served through apache on port 80. To achieve this, I have configured Plone to run on port 8080 and apache on port 80. Plone is served through apache via mod_proxy with success and "appears" on port 80. However since all requests to port 80 now go to the plone instance, and I can't use my php, files, etc. that are in the apache directory.

    What I am trying to do is somehow bypass the proxy function for a specific URL or subdomain so I can access the apache www directory and all of it's files.

    This is the configuration I put in httpd.conf to make my Plone instance run behind apache:
    <VirtualHost *>
    ServerName biocookies.com
    ServerAlias www.biocookies.com
    ServerAdmin nickolas35@gmail.com
    ProxyPass / http://localhost:8080/VirtualHostBase/http/biocookies.com:80/Plone/VirtualHostRoot/
    ProxyPassReverse / http://localhost:8080/VirtualHostBase/http/biocookies.com:80/Plone/VirtualHostRoot/
    </VirtualHost>

    I used a Zope function called VirtualHostMonster which you may not be familiar with, but probably doesn't matter in this situation.
    If it helps here is the tutorial I used:
    http://plone.org/documentation/how-to/plone-with-apache

    Simply put, I need an exception to the proxy config that allows apache requests without changing the port. If anyone can offer insight, I would greatly appreciate it.

    - Nick
     
    mastafoo, Jul 24, 2009 IP
  2. icyshout

    icyshout Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    your probably running two different instances of apache and one may or may not be picking up your configuration
     
    icyshout, Jul 24, 2009 IP
  3. mastafoo

    mastafoo Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'm running one instance, and have actually just achieved the desired effect partially by creating a subdomain (fs.biocookies.com) and directing it to the server's IP. It loads the index page of my apache directory. If I use just biocookies.com it loads my plone site. However, If I try to load a subdirectory of my apache folder (e.g. fs.biocookies.com/chat2) it takes me back to plone and gives me a 404.

    I guess now I'm trying to find out how to make directories work with this "subdomain" method.
     
    mastafoo, Jul 24, 2009 IP
  4. icyshout

    icyshout Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It sounds like you need to create a cname entry in your domain settings and point the subdomain to an actual page then from that page you can use a php redirect to point to wherever you want.
     
    icyshout, Jul 24, 2009 IP
  5. mastafoo

    mastafoo Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    My subdomain isn't working too well... It stopped working and I could only access my apache index again when I created another subdomain with the same settings. At this moment I can only access the index of my apache server via img.biocookies.com, no directories or anything else. I was thinking I could listen on multiple ports and use mod_proxy to redirect the requests from a certain domain to that port (but it still has to be port 80 on the user end). Maybe there is a rewriterules method I can use? Or possibly virtual hosting? I'm stumped...


    P.S. I can serve plone through apache using this method as well:
    RewriteRule ^($|/.*) \
    http://127.0.0.1:8080/VirtualHostBase/\
    http/%{SERVER_NAME}:80/Plone/VirtualHostRoot$1 [L,P]
     
    Last edited: Jul 24, 2009
    mastafoo, Jul 24, 2009 IP
  6. mastafoo

    mastafoo Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Problem resolved:

    RewriteRule ^/bcfs/(.*) - [L]
    RewriteRule ^/bcfs - [L]

    RewriteRule ^($|/.*) \
    http://127.0.0.1:8080/VirtualHostBase/\
    http/%{SERVER_NAME}:80/Plone/VirtualHostRoot$1 [L,P]

    Thanks for the help, though, icyshout
     
    mastafoo, Jul 24, 2009 IP