using Apache as proxy to snipsnap
The following code block is from a test snipsnap installation showing how to configure two snipsites using Apaches as proxy and also it resolves the handling of the favicon using subsnips.
# Virtual Host config for snipsnap relies on mod_proxy and mod_proxy_http
NameVirtualHost 192.168.2.4:8080<VirtualHost 192.168.2.4:8080 >
ServerName snip2
CustomLog var/logs/access-subsite.log common
ErrorLog var/logs/error-subsite.log
ProxyVia full
ProxyRequests off
ProxyPass /favicon.ico http://localhost:80/subsite/theme/images/favicon.ico
ProxyPass / http://localhost:80/subsite/
ProxyPassReverse / http://localhost:80/subsite/
</VirtualHost><VirtualHost 192.168.2.4:8080 >
ServerName snip1
ProxyVia full
ProxyRequests off
ProxyPass / http://localhost:80/
ProxyPassReverse / http://localhost:80/
</VirtualHost><VirtualHost *:8080 >
ServerName default
ProxyVia full
ProxyRequests off
ProxyPass / http://localhost:80/
ProxyPassReverse / http://localhost:80/
</VirtualHost>
Logs and Logrotation
copied from snipsnap.org
Since version-0.5.2a
SnipSnap contains support for multiple SnipSpaces within a single web application. To install a new instance follow these instructions:
Prerequisites
- SnipSnap installed (follow default install/setup)
- Invent a prefix for new instance. The prefix is just like a context path in a web application, but handled by SnipSnap itself.
- Write down the installation key told to you by SnipSnap:
SnipSnap 0.5.2a
Copyright (c) 2000-2004 Fraunhofer Gesellschaft
Fraunhofer Institute for Computer Architecture and Software Technology
All Rights Reserved. See License Agreement for terms and conditions of use.
Responsible Authors: Stephan J. Schmidt, Matthias L. Jugel.
>> Loading: / (SnipSnap, http://<yourhost>:<yourport>)
>> Installation key: eeb8b
>> Loaded 1 instances (0 not configured).
Installation of a new Instance
- Logout from SnipSnap
- Open the URL http://<yourhost>:<yourport>/admin/configure?prefix=/foo
- Enter the installation key (if you are not asked you have not logged off)
- Follow the Setup Wizard
You will be redirected to your instance which is available using the URL
http://<yourhost>:<yourport>/foo
Important Note for Proxy Users
If you are using the
Apache as proxy method you may not be able to access the new instances via the proxy set up for the main instance. This means, http://yourdomain.com/ works fine, but http://yourdomain/foobar will not work and redirect you to the main instance.
A workaround is to either setup a new proxy configuration that directly access the new instance:
<VirtualHost ...>
ProxyPass / http://<server>:<port>/foobar
ProxyPassReverse / http://<server>:<port>/foobar
</VirtualHost>
… or set the context path of that instance to the prefix: