Replace default apache vhost and restrict mod_status to hcoop members
[hcoop/zz_old/debian/hcoop-apache2-config.git] / files / sites-available / default.hcoop
diff --git a/files/sites-available/default.hcoop b/files/sites-available/default.hcoop
new file mode 100644 (file)
index 0000000..f17fdeb
--- /dev/null
@@ -0,0 +1,65 @@
+<VirtualHost *:80>
+        ServerAdmin webmaster@localhost
+
+        DocumentRoot /var/www
+        <Directory />
+                Options FollowSymLinks
+                AllowOverride None
+        </Directory>
+        <Directory /var/www/>
+                Options Indexes FollowSymLinks MultiViews
+                AllowOverride None
+                Order allow,deny
+                allow from all
+        </Directory>
+
+        ErrorLog ${APACHE_LOG_DIR}/error.log
+
+        # Possible values include: debug, info, notice, warn, error, crit,
+        # alert, emerg.
+        LogLevel warn
+
+        CustomLog ${APACHE_LOG_DIR}/access.log combined
+</VirtualHost>
+
+<VirtualHost *:443>
+        SSLEngine on
+        SSLCertificateFile /etc/hcoop-ssl/hcoop.pem
+
+        ServerAdmin webmaster@localhost
+
+        DocumentRoot /var/www
+        <Directory />
+                Options FollowSymLinks
+                AllowOverride None
+        </Directory>
+        <Directory /var/www/>
+                Options Indexes FollowSymLinks MultiViews
+                AllowOverride None
+                Order allow,deny
+                allow from all
+        </Directory>
+
+       # HCoop members can check server status, but only over SSL
+       <Location /server-status>
+                 SetHandler server-status
+                 AuthType kerberos
+                 KrbServiceName apache2
+                 Krb5Keytab /etc/keytabs/service/apache
+                 KrbMethodNegotiate on
+                 KrbMethodK5Passwd on
+                 KrbVerifyKDC on
+                 KrbAuthRealms HCOOP.NET
+                 KrbSaveCredentials off
+                 AuthName "Server Status (HCoop login)"
+                 Require valid-user
+        </Location>
+
+        ErrorLog ${APACHE_LOG_DIR}/error.log
+
+        # Possible values include: debug, info, notice, warn, error, crit,
+        # alert, emerg.
+        LogLevel warn
+
+        CustomLog ${APACHE_LOG_DIR}/access.log combined
+</VirtualHost>