mod_proxy and mod_rewrite

WinterRG

Verified User
Joined
Dec 10, 2005
Messages
6
Are these supported under DA?

I have other servers that I am running Zope and Plone on and would like to install Zope and Plone on my DA machines also.

TIA

Russ
 
No worries, Got It Fixed Up...

OK, I got it all working, with Zope and Plone working just fine.

For those that are interested...

Ensure you have the correct version of Python for the Zope Instance.

I used the following, and had to update Python to 2.3.5

Plone 2.1.1,
Zope (Zope 2.8.4-final, python 2.3.5, linux2),
Python 2.3.5 (#2, Dec 10 2005, 19:54:10) [GCC 3.4.4 20050721 (Red Hat 3.4.4-2)]

I added Python 2.3.5 to a new directory and sym-linked from /usr/bin/python2.3.5 to my new install directory.

add a new system user and passwd, this guy will be used to run Zope as the administrator on an everyday basis (using root or admin is not a good idea)

su to your new zope administrator user

Download and untar Zope in to a temp directory... from the temp directory...

Run Zope configure with --prefix= for where you want Zope installed, I used /usr/local/Zope

also --with-python= for where you installed your new python libraries

Run Zope make and make install

Go to the Zope installation /bin directory and run ./mkzopeinstance.py enter the Zope Installation Directory for the directory name, enter the Zope Admin username you made before and passwd.

OK, you now have Zope installed, modify any config variables required in <zope-install-directory>/etc/zope.conf

Make sure you set the "effective-user" param to your zope admin user you made earlier!!

Open up any firewall ports required (default for management is 8080)

Run zopectl start from <zope-install-directory>/bin
(This may need to be run twice, first time Zope may drop out after a few minutes.)


OK, now you need to enable Apache's mod_rewrite (if not already) and proxy_module

edit your /etc/httpd/conf/httpd.conf to uncomment both lines for mod_rewrite and proxy_module

Run httpd -t to check the syntax, if all is well, restart apache "httpd restart"

If all has gone well to this point you can download and add any Zope or if using Plone or Silva or something the appropriate Products (Products are basically the applications & Components used by Zope)
untar these in to your "Products" directory.

Restart Zope - <zope-install-directory>/bin/zopectl restart to pick up the new products.

Login to your Zope Management Interface http://<your-da-hostname>:8080/manage

You should see a number of "Products" in your Products directory, click on the ROOT_LEVEL menu oprion (at the top left) now look to your top right og the screen and see a drop-down-select box, install any products you need from there.

We installed "Plone Site", give your new Plone Site a name, this will be the name that the domain with proxy to later on. Fill out the rest of the details requested. Remember the name for later.


From within DA, add your new domain as you usually would. Once complete and answering correctly through DNS and Apache (This may take awhile if its a new domain)

Then in DA go to the Admin Level, Custtom HTTPD Configuration, select the new domain and modify the Custom config with the Zope required ReWrite and Proxy rules, mine looked something like this;

RewriteEngine On
RewriteRule ^/(.*) http://<your-da-servername>:8080/VirtualHostBase/http/<your-newly-added-domainname>:80/<the-name-you-called the-plone/silva site-in-ZopeManagementInterface-earlier>/VirtualHostRoot/$1 [L,P]
ProxyVia on

To be safe, restart Apache and you should be good to go.

http://www.<your-new-domain>.com.au (your tld)

For any further information or more detailed Zope and Plone information refer to http://zope.org/ (Zope Server) and http://plone.org (Plone CMS) or http://www.infrae.org (Silva CMS)

Hope this is of interest or of use to someone..

Russ
 
Very nice tutorial, thanks! However, while trying to follow it, I noticed that there's no libproxy.so anywhere on my machine! Did something went wrong with Apache's installation? In fact, /usr/lib/apache only lists the following: libphp4.so mod_frontpage.so mod_perl.so. Any ideas or suggestions?
 
As far as I know and it is like this on all my servers;

/usr/lib/apache/libproxy.so
/usr/local/directadmin/customapache/apache_<X.Y.Z>/src/modules/proxy/libproxy.so


Hope this helps, otherwise you "could" build the proxy module from scratch, plenty of information on that around the web, however (not having done it myself this way) I would assume that it would be a little awkward as you might have to also install a second Apache, so as not to effect your currently live httpd server.
 
Back
Top