Mercurial > hg > soundsoftware-site
view deploy/config/code.conf.in @ 1613:90bed4e10cc8 deploy
Download file link
author | Chris Cannam |
---|---|
date | Wed, 30 Aug 2017 17:24:37 +0100 |
parents | 07deb8466f65 |
children |
line wrap: on
line source
# A test Apache config. Lacks SSL, lacks a desirable extra layer of # authentication for admin interface paths. Do not deploy this. # Note this has been updated for Apache 2.4, which introduced a number # of (welcome) changes to access control directives. PerlLoadModule Apache::Authn::SoundSoftware <VirtualHost *:80> ServerName code.soundsoftware.ac.uk ServerAdmin chris.cannam@soundsoftware.ac.uk DocumentRoot /var/www/code/public PassengerRestartDir restart_files PassengerHighPerformance on PassengerMaxRequests 50000 PassengerStatThrottleRate 5 PassengerStartTimeout 60 PassengerFriendlyErrorPages on RailsSpawnMethod smart ExpiresDefault "access plus 1 minute" # <Location /sys> # AuthType Basic # AuthUserFile "/etc/apache2/auth/user.htpasswd" # AuthName "code.soundsoftware.ac.uk" # Require user user # </Location> # <Location /admin> # AuthType Digest # AuthUserFile "/etc/apache2/auth/admin.htdigest" # AuthName "code.soundsoftware.ac.uk admin interface" # Require user admin # </Location> <DirectoryMatch "^/.*/\.svn/"> Require all denied </DirectoryMatch> <DirectoryMatch "^/.*/\.hg/"> Require all denied </DirectoryMatch> <DirectoryMatch "^/.*/\.git/"> Require all denied </DirectoryMatch> <Directory /var/www/code/public> Options -MultiViews </Directory> <Directory /var/www/code/public/themes/soundsoftware/stylesheets/fonts> # Avoid other sites embedding our fonts RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://code.soundsoftware.ac.uk/.*$ [NC] RewriteRule \.(ttf|woff|eot|otf|svg|zip|gz|html|txt)$ - [F] </Directory> ScriptAlias /hg "/var/hg/index.cgi" <Location /hg> AuthName "Mercurial" AuthType Basic Require valid-user PerlAccessHandler Apache::Authn::SoundSoftware::access_handler PerlAuthenHandler Apache::Authn::SoundSoftware::authen_handler PerlSetVar HTTPS "off" SoundSoftwareDSN "dbi:Pg:database=code;host=localhost" SoundSoftwareDbUser "code" SoundSoftwareDbPass "INSERT_DATABASE_PASSWORD_HERE" SoundSoftwareRepoPrefix "/var/hg/" #!!! "on" in production please!: SoundSoftwareSslRequired "off" Options +ExecCGI AddHandler cgi-script .cgi ExpiresDefault now </Location> Alias /git "/var/files/git-mirror" <Directory "/var/files/git-mirror"> Options -Indexes +FollowSymLinks Require all granted </Directory> <Directory ~ "/var/files/git-mirror/.*\.workdir"> Require all denied </Directory> <Directory ~ "/var/files/git-mirror/__.*"> Require all denied </Directory> ErrorLog /var/log/apache2/code-error.log CustomLog /var/log/apache2/code-access.log vhost_combined LogLevel warn ServerSignature Off </VirtualHost>