wiki:ApacheConfiguration

Apache configuration

Required modules

  • mod_rewrite, for pretty URLs
  • mod_ssl, for authentication with SSL certificates
  • mod_dav and mod_dav_fs, for serving test suite galleries as DAV shares

Configuration

Below is a sample Apache configuration.

<VirtualHost *:80>
        DocumentRoot /var/www/www.officeshots.org/trunk/www/app/webroot
        ServerName www.officeshots.org

        LogLevel warn
        CustomLog /var/log/apache2/www.officeshots.org/access.log combined
        ErrorLog /var/log/apache2/www.officeshots.org/error.log

        # Do not serve .svn directories
	RedirectMatch 404 /\\.svn(/|$)

        ServerSignature On
</VirtualHost>

# This part provides HTTPS access. It allows registered users to log in with an
# SSL client certificate that lists their e-mail address. This is *required* for
# factories that attempt to connect.

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
        DocumentRoot /var/www/www.officeshots.org/trunk/www/app/webroot
        ServerName www.officeshots.org

        LogLevel warn
        CustomLog /var/log/apache2/www.officeshots.org/access.log combined
        ErrorLog /var/log/apache2/www.officeshots.org/error.log

	# SSL using mod_ssl
	SSLEngine On
	SSLCertificateFile /etc/apache2/ssl/www.officeshots.org.cert
	SSLCertificateKeyFile /root/certs/www.officeshots.org.key
	SSLCACertificatePath /etc/ssl/email-certs
	SSLVerifyClient require
	SSLVerifyDepth 1
	SSLSessionCacheTimeout 1800

	# Officeshots needs the SSL environment variables to extract the e-mail address
	<FilesMatch "\.php$">
		SSLOptions +StdEnvVars
	</FilesMatch>

	BrowserMatch ".*MSIE.*" \
		nokeepalive ssl-unclean-shutdown \
		downgrade-1.0 force-response-1.0

        # Do not serve .svn directories
	RedirectMatch 404 /\\.svn(/|$)

        ServerSignature On
</VirtualHost>
</IfModule>

# This part shares the testsuite galleries as a read-only WebDAV share

<IfModule mod_dav.c>
<VirtualHost *:80>
        DocumentRoot /var/www/www.officeshots.org/trunk/www/app/files/testsuites
        ServerName dav.officeshots.org

        LogLevel warn
        CustomLog /var/log/apache2/dav.officeshots.org/access.log combined
        ErrorLog /var/log/apache2/dav.officeshots.org/error.log

        RedirectMatch 404 /\\.svn(/|$)

        ServerSignature On

        <Location />
                <Limit GET PROPFIND OPTIONS REPORT>
                        DAV on
                </Limit>
        </Location>
</VirtualHost>
</IfModule>

Last modified 9 years ago Last modified on 05/25/10 12:29:10