Installing Pier on Ubuntu

From Organic Design
Jump to: navigation, search
Procedure.svg Installing Pier on Ubuntu
Organic Design procedure

Set Up a Pier Image

Pier is a content management system based on the Seaside web application framework. While some static aspects of the site can be farmed across to apache2, the section below refers to situations where the Pier image does file hosting as well as dynamic content:

  • Download from
  • Unzip into any directory, but probably /var/www/domains/ for an OD install
  • As root, change ownership to www-data:
chown -R www-data:www-data
  • Edit /etc/rc.local and add the following BASH script just before exit 0 (note you will need to change paths if you unzipped into a directory other than /var/www/domains)
# settings
VM_PARAMS="-mmap 256m -vm-sound-null -vm-display-null"
# start the vm
exec \
setuidgid "$USER" \
  • Restart
  • Navigate to
  • Alternatively or when testing, to start Pier manually, as root:
cd /var/www/domains/


Serve Pier Content Alongside Apache

This section is based on an OD Apache2 server configuration is being used, but the principle applies to any Apache2 server.

In the simple image configuration, requests for the pier site need to be forwarded to the correct port and served with the image's own server, not Apache2. Natively, that port is 8080:

  • Add to /etc/hosts
  • As root, enable proxy:
a2enmod proxy proxy_http
  • Then edit /etc/apache2/mods-enabled/proxy.conf, by adding Allow from as below:
<IfModule mod_proxy.c>

# If you want to use apache2 as a forward proxy, uncomment the
# 'ProxyRequests On' line and the <Proxy *> block below.
# WARNING: Be careful to restrict access inside the <Proxy *> block.
# Open proxy servers are dangerous both to your network and to the
# Internet at large.
# If you only want to use apache2 as a reverse proxy/gateway in
# front of some web application server, you DON'T need
# 'ProxyRequests On'.

<Proxy *>
        AddDefaultCharset off
        Order deny,allow
#        Deny from all
#        Allow from
        Allow from

# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
ProxyVia On

  • Finally add, at the top of the mod_rewrite in /etc/apache2/sites-available/default, directly under RewriteEngine On:
ProxyPreserveHost On
RewriteCond %{HTTP_HOST} ^pier\
RewriteRule (.*)$1 [P,L]