mind serializer and weblog
[ start | index | login ]
start > Apache as Proxy

Apache as Proxy

Created by case. Last edited by case, 7 days ago. Viewed 293 times. #5
[diff] [history] [edit] [rdf]
labels
attachments

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

  1. SnipSnap installed (follow default install/setup)
  2. Invent a prefix for new instance. The prefix is just like a context path in a web application, but handled by SnipSnap itself.
  3. 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

  1. Logout from SnipSnap
  2. Open the URL http://<yourhost>:<yourport>/admin/configure?prefix=/foo
  3. Enter the installation key (if you are not asked you have not logged off)
  4. 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:

app.real.path=/prefix

Bypassing the proxy for local services

If you want to bypass the proxy for local services, such as SVN, create a ProxyPass exclusion. If you use basic authentication for that service, you need also to exclude the error location, as this is used internally to prompt the authentication request to the client (which will fail, if it is proxied away)

ProxyPass /excludeThisDirOrLocation !
ProxyPass /error !
Please login to post a comment.
Quick Links
WhatIsThis about?
Midlets (mobile apps)
TimeLine
Charley a dog's life
MovieReview
Impressum
Project (internal)

Logged in Users: (2)
… and 7 Guests.

< October 2008 >
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
262728293031

Icon-Snip more changes...

Blogs
>>++ vox.machina ++
>>Zitate - Sprüche - Aphorismen
>>Wil Wheaton
>>Mathematische Kleinigkeiten
>>William Gibson
>>instant-thinking
>>Over heard in NY

nearby  sites
link=http://www.mozilla.org/products/firefox/central.html
link=http://www.nutellausa.com/
link=http://snipsnap.org
link=http://www.amazon.de/exec/obidos/registry/wishlist/ref=cs_nav_top_2/028-7651535-0049343
RSS Feed RSS Feed
post to del.icio.us

Stats: 1179 snips by 16 users
created 5 years and 265 days ago

Powered by
>>SnipSnap 1.0b2-uttoxeter
with SnipScale 1.1.0



This work is licensed under a
>>Creative Commons License.

SEARCH