* scripts/mir-setup/conf: updated to use tomcat5.5
authorianb <ianb>
Sun, 18 Jan 2009 03:41:13 +0000 (03:41 +0000)
committerianb <ianb>
Sun, 18 Jan 2009 03:41:13 +0000 (03:41 +0000)
 * tomcat4 versions of config files are in scripts/mir-setup/conf/tomcat4
 * other changes to site-httpd.conf:
   + use log format 'anon' (defined in /etc/apache2/conf.d/mir-anon-access-log,
     which is created by mir-prepare)
   + Include /etc/apache2/mir-sites/ssl-dedicated/$SITE.conf
   + add $MIRRORFQDN as a ServerAlias
 * site-ssl-dedicated-httpd.conf: add $MIRRORFQDN and $ALIAS as ServerAliases

scripts/mir-setup/conf/config
scripts/mir-setup/conf/env
scripts/mir-setup/conf/site-httpd.conf
scripts/mir-setup/conf/site-ssl-dedicated-httpd.conf
scripts/mir-setup/conf/site-ssl-httpd-fragment.conf
scripts/mir-setup/conf/tomcat4/config [new file with mode: 0755]
scripts/mir-setup/conf/tomcat4/env [new file with mode: 0755]
scripts/mir-setup/conf/tomcat4/site-httpd.conf [new file with mode: 0755]
scripts/mir-setup/conf/tomcat4/site-ssl-dedicated-httpd.conf [new file with mode: 0755]
scripts/mir-setup/conf/tomcat4/site-ssl-httpd-fragment.conf [new file with mode: 0755]

index 89c59b5..8dc801c 100755 (executable)
@@ -1,4 +1,4 @@
-# $Id: config,v 1.1.2.1 2006/11/11 12:52:06 zak Exp $
+# $Id: config,v 1.1.2.2 2009/01/18 03:41:13 ianb Exp $
 
 # System configuration file for mir-setup script
 
@@ -27,12 +27,12 @@ if [ -z "$MIRVERSION" ]; then MIRVERSION=MIR_1_1; fi
 APACHECONFDIR=/etc/apache2/mir-sites
 
 APACHECTL=/usr/sbin/apache2ctl
-WEBAPPSDIR=/var/lib/tomcat4/webapps
-TOMCATSCRIPT=/etc/init.d/tomcat4
-TOMCATUSER=tomcat4
+WEBAPPSDIR=/var/lib/tomcat5.5/webapps
+TOMCATSCRIPT=/etc/init.d/tomcat5.5
+TOMCATUSER=tomcat55
 
 # May be overridden
-if [ -z "$TOMCATGROUP" ]; then TOMCATGROUP=tomcat4; fi
+if [ -z "$TOMCATGROUP" ]; then TOMCATGROUP=tomcat55; fi
 
 # Include environment settings
 source "$CONFDIR/env"
index 12a3fc6..b53255c 100755 (executable)
@@ -1,4 +1,4 @@
-export TOMCAT_HOME=/var/lib/tomcat4
+export TOMCAT_HOME=/var/lib/tomcat5.5
 export JAI_HOME=/usr/local/lib/jai-1_1_2_01/lib
 export JAI_IIO_HOME=/usr/local/lib/jai_imageio-1_0_01/lib
 export CLASSPATH=.:$JAI_IIO_HOME/clibwrapper_jiio.jar:$JAI_IIO_HOME/jai_imageio.jar:$JAI_HOME/jai_core.jar:$JAI_HOME/jai_codec.jar:$JAI_HOME/mlibwrapper_jai.jar:/usr/share/java:$CLASSPATH
index 87f0921..2ccd9da 100755 (executable)
@@ -4,16 +4,15 @@
   ServerAdmin $USER@$FQDN
   DocumentRoot $PRODUCTIONDIR
   ServerName $FQDN
+  ServerAlias $MIRRORFQDN
   ServerAlias $ALIAS
 
-  CustomLog /var/log/apache2/$SITE.log combined
+  CustomLog /var/log/apache2/$SITE.log anon
 
 # Back end should only be accessed via SSL; bounce to enforce this
   Redirect /$SITE/servlet/Mir https://$SECUREFQDN/$SITE/servlet/Mir
-  
-  <Location /$SITE>
-    JkUriSet worker ajp13:localhost:8009
-  </Location>
+
+  JkMount /$SITE/*  ajp13_worker
   <Directory $PRODUCTIONDIR>
     Options Indexes IncludesNoExec FollowSymLinks MultiViews
     IndexOptions +SuppressHTMLPreamble +SuppressDescription
@@ -42,3 +41,5 @@
     Header append Vary User-Agent env=!dont-vary
   </Location>
 </VirtualHost>
+
+Include /etc/apache2/mir-sites/ssl-dedicated/$SITE.conf
index 211e8f4..b06c529 100755 (executable)
@@ -4,14 +4,16 @@
   ServerAdmin $USER@$FQDN
   DocumentRoot $PRODUCTIONDIR
   ServerName $SECUREFQDN
+  ServerAlias $MIRRORFQDN
+  ServerAlias $ALIAS
 
   SSLEngine on
   SSLCertificateFile /etc/apache2/ssl/$SECUREFQDN.crt
   SSLCertificateKeyFile /etc/apache2/ssl/$SECUREFQDN.key
 
-  <Location /$SITE>
-    JkUriSet worker ajp13:localhost:8009
-  </Location>
+  CustomLog /var/log/apache2/$SITE-ssl.log anon
+
+  JkMount /$SITE/*  ajp13_worker
   <Directory $PRODUCTIONDIR>
     Options Indexes IncludesNoExec FollowSymLinks MultiViews
     IndexOptions +SuppressHTMLPreamble +SuppressDescription
index e78ebd0..98e9f72 100755 (executable)
@@ -5,6 +5,4 @@
 # for a canonical host which has a dedicated IP address. If your
 # site has its own IP, this can be the same as your ususl hostname.
 
-  <Location /$SITE>
-    JkUriSet worker ajp13:localhost:8009
-  </Location>
+  JkMount /$SITE/*  ajp13_worker
diff --git a/scripts/mir-setup/conf/tomcat4/config b/scripts/mir-setup/conf/tomcat4/config
new file mode 100755 (executable)
index 0000000..bb7a728
--- /dev/null
@@ -0,0 +1,38 @@
+# $Id: config,v 1.1.2.1 2009/01/18 03:41:13 ianb Exp $
+
+# System configuration file for mir-setup script
+
+# $SITE = short site name, eg "uk"
+# $FQDN = long site name, eg "www.indymedia.org.uk"
+
+# Main install directory for site
+INSTALLDIR=/mir/$SITE
+
+# Directory for produced files (HTML, media etc)
+PRODUCTIONDIR=/imc/mir/$SITE
+
+# Database name
+DATABASE=$SITE
+
+# CVS source for Mir
+MIRCVSROOT=:pserver:anonymous@cvs.codecoop.org:/cvsroot/mir
+
+if [ -z "$MIRVERSION" ]; then MIRVERSION=MIR_1_1; fi
+
+
+# System-wide Postgres, Apache and Tomcat stuff
+
+# Files in this directory should all be included by the main Apache config
+# file with a wildcard
+APACHECONFDIR=/etc/apache2/mir-sites
+
+APACHECTL=/usr/sbin/apache2ctl
+WEBAPPSDIR=/var/lib/tomcat4/webapps
+TOMCATSCRIPT=/etc/init.d/tomcat4
+TOMCATUSER=tomcat4
+
+# May be overridden
+if [ -z "$TOMCATGROUP" ]; then TOMCATGROUP=tomcat4; fi
+
+# Include environment settings
+source "$CONFDIR/env"
diff --git a/scripts/mir-setup/conf/tomcat4/env b/scripts/mir-setup/conf/tomcat4/env
new file mode 100755 (executable)
index 0000000..12a3fc6
--- /dev/null
@@ -0,0 +1,5 @@
+export TOMCAT_HOME=/var/lib/tomcat4
+export JAI_HOME=/usr/local/lib/jai-1_1_2_01/lib
+export JAI_IIO_HOME=/usr/local/lib/jai_imageio-1_0_01/lib
+export CLASSPATH=.:$JAI_IIO_HOME/clibwrapper_jiio.jar:$JAI_IIO_HOME/jai_imageio.jar:$JAI_HOME/jai_core.jar:$JAI_HOME/jai_codec.jar:$JAI_HOME/mlibwrapper_jai.jar:/usr/share/java:$CLASSPATH
+export LD_LIBRARY_PATH=$JAI_IIO_HOME:$JAI_HOME:$LD_LIBRARY_PATH
diff --git a/scripts/mir-setup/conf/tomcat4/site-httpd.conf b/scripts/mir-setup/conf/tomcat4/site-httpd.conf
new file mode 100755 (executable)
index 0000000..87f0921
--- /dev/null
@@ -0,0 +1,44 @@
+# Editor: vim:syn=apache
+# $FQDN
+<VirtualHost *:80>
+  ServerAdmin $USER@$FQDN
+  DocumentRoot $PRODUCTIONDIR
+  ServerName $FQDN
+  ServerAlias $ALIAS
+
+  CustomLog /var/log/apache2/$SITE.log combined
+
+# Back end should only be accessed via SSL; bounce to enforce this
+  Redirect /$SITE/servlet/Mir https://$SECUREFQDN/$SITE/servlet/Mir
+  
+  <Location /$SITE>
+    JkUriSet worker ajp13:localhost:8009
+  </Location>
+  <Directory $PRODUCTIONDIR>
+    Options Indexes IncludesNoExec FollowSymLinks MultiViews
+    IndexOptions +SuppressHTMLPreamble +SuppressDescription
+    AddHandler server-parsed .html
+    AddType 'text/html; charset=utf-8' .html
+    AllowOverride None
+    Order allow,deny
+    Allow from all  
+  </Directory>
+  # Apache gzip compression
+  <Location />
+    # This is taken from here: 
+    # http://httpd.apache.org/docs-2.0/mod/mod_deflate.html
+    # Insert filter
+    SetOutputFilter DEFLATE
+    # Netscape 4.x has some problems...
+    BrowserMatch ^Mozilla/4 gzip-only-text/html
+    # Netscape 4.06-4.08 have some more problems
+    BrowserMatch ^Mozilla/4\.0[678] no-gzip
+    # MSIE masquerades as Netscape, but it is fine
+    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
+    # Don't compress images
+    SetEnvIfNoCase Request_URI \
+    \.(?:gif|jpe?g|png)$ no-gzip dont-vary
+    # Make sure proxies don't deliver the wrong content
+    Header append Vary User-Agent env=!dont-vary
+  </Location>
+</VirtualHost>
diff --git a/scripts/mir-setup/conf/tomcat4/site-ssl-dedicated-httpd.conf b/scripts/mir-setup/conf/tomcat4/site-ssl-dedicated-httpd.conf
new file mode 100755 (executable)
index 0000000..211e8f4
--- /dev/null
@@ -0,0 +1,42 @@
+# Editor: vim:syn=apache
+# $SECUREFQDN (SSL)
+<VirtualHost $SECUREFQDN:443>
+  ServerAdmin $USER@$FQDN
+  DocumentRoot $PRODUCTIONDIR
+  ServerName $SECUREFQDN
+
+  SSLEngine on
+  SSLCertificateFile /etc/apache2/ssl/$SECUREFQDN.crt
+  SSLCertificateKeyFile /etc/apache2/ssl/$SECUREFQDN.key
+
+  <Location /$SITE>
+    JkUriSet worker ajp13:localhost:8009
+  </Location>
+  <Directory $PRODUCTIONDIR>
+    Options Indexes IncludesNoExec FollowSymLinks MultiViews
+    IndexOptions +SuppressHTMLPreamble +SuppressDescription
+    AddHandler server-parsed .html
+    AddType 'text/html; charset=utf-8' .html
+    AllowOverride None
+    Order allow,deny
+    Allow from all  
+  </Directory>
+  # Apache gzip compression
+  <Location />
+    # This is taken from here: 
+    # http://httpd.apache.org/docs-2.0/mod/mod_deflate.html
+    # Insert filter
+    SetOutputFilter DEFLATE
+    # Netscape 4.x has some problems...
+    BrowserMatch ^Mozilla/4 gzip-only-text/html
+    # Netscape 4.06-4.08 have some more problems
+    BrowserMatch ^Mozilla/4\.0[678] no-gzip
+    # MSIE masquerades as Netscape, but it is fine
+    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
+    # Don't compress images
+    SetEnvIfNoCase Request_URI \
+    \.(?:gif|jpe?g|png)$ no-gzip dont-vary
+    # Make sure proxies don't deliver the wrong content
+    Header append Vary User-Agent env=!dont-vary
+  </Location>
+</VirtualHost>
diff --git a/scripts/mir-setup/conf/tomcat4/site-ssl-httpd-fragment.conf b/scripts/mir-setup/conf/tomcat4/site-ssl-httpd-fragment.conf
new file mode 100755 (executable)
index 0000000..e78ebd0
--- /dev/null
@@ -0,0 +1,10 @@
+# Editor: vim:syn=apache
+# $FQDN
+
+# This should be included within the SSL virtual host definition
+# for a canonical host which has a dedicated IP address. If your
+# site has its own IP, this can be the same as your ususl hostname.
+
+  <Location /$SITE>
+    JkUriSet worker ajp13:localhost:8009
+  </Location>