The easy Weblog and Wiki Software
[ start | index | login ]
start > Apache as Proxy

Apache as Proxy

Created by funzel. Last edited by vulcan, 2 years and 218 days ago. Viewed 7,295 times. #8
[diff] [history] [edit] [rdf]
labels
attachments
  • SnipSnap can run without Apache, but if you must use Apache and Apache uses port 80 you can use Apache as a proxy.
  • Install SnipSnap as explained above. Leave the Port somehwhere above 1024 (default is 8668).
  • Edit your apache httpd.conf (enable mod_proxy):
# Enable mod_proxy (uncomment the LoadModule line!)
# Both works in apache1.x and apache2.x
LoadModule proxy_module /usr/lib/apache/1.3/mod_proxy.so

# Uncomment the AddModule line for mod_proxy.c # Only in apache1.x,in apache2.x,you did not need this line AddModule mod_proxy.c

# make sure you don't allow anyone to use your apache as proxy ProxyRequests off

# use apache as a reverse proxy to your [SnipSnap] server: # my.snipsnap.host and path are what you entered during installation. # The host my.snipsnap.host can be a fully qualified domain name or an IP number. # The path is the relative path to your snipsnap directory from your web server # root directory. If you placed the snipsnap folder at the root level you # don't need to specify the path. # If you left host empty during installation enter localhost as the host. ProxyPass /snipsnap/ http://my.snipsnap.host:8668/path ProxyPassReverse /snipsnap/ http://my.snipsnap.host:8668/path

Now your can use your SnipSnap on your apache web server: http://your.server.com/snipsnap/

ATTENTION: If you use multiple SnipSnap applications make sure you let them run on different ports as apaches mod_proxy can't get the cookies right.

ATTENTION: Be careful with the slashes. /snipsnap/ >>http://my.snipsnap.host:8668/path/ should work. In other cases you would create a neverending redirection cycle (pmode);if you can't get it work by configure the proxy by following above steps;try "/snipsnap" instead of "/snipsnap/".

ATTENTION:__Do NOT forget to enter the administration interface to set the context path to "/snipsnap" or other words you like, but it should be corresponding with what you set in the httpd.conf.

Securing SnipSnap using VirtualHost/SSL with Apache

This example assumes you have configured the SSL engine, loaded the mod_proxy and mod_access. It is even possible to use mod_pam (see apache docs).

<VirtualHost my.snipsnap.domain:443>
  ServerName    my.snipsnap.domain
  ProxyVia      full
  ProxyRequests off
  NoCache       *
  ProxyPass             /       http://internal.server:8668/
  ProxyPassReverse      /       http://internal.server:8668/
  <Directory proxy:*>
    AuthType Basic
    AuthName "SnipSnap VPN Access"
    AuthUserFile /etc/apache/snipsnap/mysnipsnap.users
    #AuthGroupFile /etc/apache/snipsnap/mysnipsnap.groups
    Require valid-user
  </Directory>
</VirtualHost>

<VirtualHost cbe.first.fraunhofer.de> RedirectMatch ^/(.*) https://my.snipsnap.domain/$1 </VirtualHost>

If you don't want SSL, remove the port ":443" and the second VirtualHost entry.

40 comments (by tgunr, jhsea3do, aspaspaspasp, fredguth, 4marcus, robd, javajames27, yem, ThoMo, Atrus, rcarmo, DaveLevy, cassiel, funzel, ramarnat, anton, peko, leo, pino, joost, soucpower, joseph, apos, mtg, gatohaus, admin, daborg) | post comment

What is SnipSnap?
SnipSnap is a free and easy to install weblog and wiki tool written in Java.

SnipSnap download
Current version: 1.0b3-uttoxeter
Try our >>Web Start Demo!

Resources

5567 Users and 13712 Snips. Installed 5 years and 363 days ago

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

snipsnap-changed for older changes.

< July 2008 >
SunMonTueWedThuFriSat
12345
6789101112
13141516171819
20212223242526
2728293031

snipsnap
Listed on BlogShares
XHTML 1.0 validated
CSS validated
RSS 2.0 validated
RSS Feed

pico-powered

Powered by SnipSnap 1.0b3-uttoxeter
YourKit >>Java Profiler

Fraunhofer FIRST

snipsnap.org | Copyright 2000-2006 Fraunhofer FIRST