Running plone.org site locally¶
Introduction¶
This document tells how to duplicate plone.org to your local machine. Previous Plone development experience needed.
Base buildout and Zope¶
Grab your own buildout copy from
- https://github.com/plone/Products.PloneOrg
- buildout it
- bin/instance fg
XDV theming¶
-
Enter xdv:
cd xdv
-
Checkout dv.xdvserver:
svn co https://codespeak.net/svn/z3/deliverance/sandboxes/optilude/dv.xdvserver/trunk/ src/dv.xdvserver
-
Get static folder to correct context:
ln -s ../static .
-
Edit nginx.cfg:
[nginx] libxml2 = ${buildout:directory}/parts/lxml/libxml2 libxslt = ${buildout:directory}/parts/lxml/libxslt [buildxsl] command = ${nginx:libxslt}/bin/xsltproc ... ${nginx:libxslt}/bin/xsltproc --html --nonet \
-
NGINX build instructions for OSX: http://www.ravelrumba.com/blog/install-nginx-webfaction/
-
Add --with-pcre=/path/to/your/pcre-8.1 in nginx.cfg. This must point extracted PCRE source code (you don't need to compile PCRE by hand, just get the source)
-
Build it:
bin/buildout -c nginx.cfg
-
If nginx building fails you can reset it with:
rm -rf parts/nginx*
-
If your buildout fails with messages like:
> /Users/moo/plone/xdv/etc/wide.xsl /bin/sh: line 1: /Users/moo/plone/xdv/parts/libxslt/bin/xsltproc: No such file or directory /bin/sh: line 7: /Users/moo/plone/xdv/parts/libxslt/bin/xsltproc: No such file or directory Check that you have xsltproc configured in nginx.cfg as instructed above.
-
After buildout completes do ngingx configtest:
bin/nginxctl configtest ... 2010/03/19 21:14:38 [info] 68212#0: the configuration file /Users/moo/plone/xdv/etc/nginx.conf was tested successfully
-
Then run it:
bin/nginxctl start
-
Add see that this servers static plone.html:
http://localhost:5500/
-
Now you can edit nginx.cfg to pull content from your local Plone:
[nginx-conf] #virtual-host = VirtualHostBase/http/new.plone.org:80/plone.org/VirtualHostRoot #backend = http://127.0.0.1:8001 # replace foobar with your Plone site id virtual-host = VirtualHostBase/http/localhost:5500/foobar/VirtualHostRoot backend = http://127.0.0.1:5011
-
You also need to touch static/rules/default.xml and comment out:
<!-- Drop plone.css, we want the merged, compressed version from plone --> <!-- <drop theme='/html/head/link[@rel="stylesheet"]'/> -->
-
Rebuild and restart nginx:
bin/buildout -c nginx.cfg ; bin/nginxctl stop ; bin/nginxctl start
-
Start Plone instance:
cd .. bin/instance1 fg
-
Try:
http://localhost:5011/manage
This should give Zope access and unthemed Plone site.
-
Try:
http://localhost:5500/
It should show the themed default "Welcome to Plone page" instead of static XDV HTML content before.