To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / extra / soundsoftware / scripted-deploy / config / code.conf @ 1583:0dcd4f8c2b8a
History | View | Annotate | Download (2.72 KB)
| 1 |
|
|---|---|
| 2 |
# A test Apache config. Lacks SSL, lacks a desirable extra layer of |
| 3 |
# authentication for admin interface paths. Do not deploy this. |
| 4 |
|
| 5 |
PerlLoadModule Apache::Authn::SoundSoftware |
| 6 |
|
| 7 |
<VirtualHost *:80> |
| 8 |
ServerName code.soundsoftware.ac.uk |
| 9 |
ServerAdmin chris.cannam@soundsoftware.ac.uk |
| 10 |
|
| 11 |
DocumentRoot /var/www/code/public |
| 12 |
PassengerRestartDir restart_files |
| 13 |
PassengerHighPerformance on |
| 14 |
PassengerMaxRequests 50000 |
| 15 |
PassengerStatThrottleRate 5 |
| 16 |
PassengerStartTimeout 60 |
| 17 |
PassengerFriendlyErrorPages on |
| 18 |
RailsSpawnMethod smart |
| 19 |
ExpiresDefault "access plus 1 minute" |
| 20 |
|
| 21 |
<DirectoryMatch "^/.*/\.svn/"> |
| 22 |
Order allow,deny |
| 23 |
Deny from all |
| 24 |
Satisfy All |
| 25 |
</DirectoryMatch> |
| 26 |
|
| 27 |
<DirectoryMatch "^/.*/\.hg/"> |
| 28 |
Order allow,deny |
| 29 |
Deny from all |
| 30 |
Satisfy All |
| 31 |
</DirectoryMatch> |
| 32 |
|
| 33 |
<DirectoryMatch "^/.*/\.git/"> |
| 34 |
Order allow,deny |
| 35 |
Deny from all |
| 36 |
Satisfy All |
| 37 |
</DirectoryMatch> |
| 38 |
|
| 39 |
<Directory /var/www/code/public> |
| 40 |
Options -MultiViews |
| 41 |
</Directory> |
| 42 |
|
| 43 |
<Directory /var/www/code/public/themes/soundsoftware/stylesheets/fonts> |
| 44 |
# Avoid other sites embedding our fonts |
| 45 |
RewriteEngine on |
| 46 |
RewriteCond %{HTTP_REFERER} !^$
|
| 47 |
RewriteCond %{HTTP_REFERER} !^http(s)?://code.soundsoftware.ac.uk/.*$ [NC]
|
| 48 |
RewriteRule \.(ttf|woff|eot|otf|svg|zip|gz|html|txt)$ - [F] |
| 49 |
</Directory> |
| 50 |
|
| 51 |
ScriptAlias /hg "/var/hg/index.cgi" |
| 52 |
|
| 53 |
<Location /hg> |
| 54 |
AuthName "Mercurial" |
| 55 |
AuthType Basic |
| 56 |
Require valid-user |
| 57 |
PerlAccessHandler Apache::Authn::SoundSoftware::access_handler |
| 58 |
PerlAuthenHandler Apache::Authn::SoundSoftware::authen_handler |
| 59 |
PerlSetVar HTTPS "on" |
| 60 |
SoundSoftwareDSN "dbi:Pg:database=code;host=localhost" |
| 61 |
SoundSoftwareDbUser "code" |
| 62 |
SoundSoftwareDbPass "INSERT_POSTGRES_PASSWORD_HERE" |
| 63 |
SoundSoftwareRepoPrefix "/var/hg/" |
| 64 |
#!!! "on" in production please!: |
| 65 |
SoundSoftwareSslRequired "off" |
| 66 |
Options +ExecCGI |
| 67 |
AddHandler cgi-script .cgi |
| 68 |
ExpiresDefault now |
| 69 |
</Location> |
| 70 |
|
| 71 |
Alias /git "/var/files/git-mirror" |
| 72 |
|
| 73 |
<Directory "/var/files/git-mirror"> |
| 74 |
Options -Indexes +FollowSymLinks |
| 75 |
Order allow,deny |
| 76 |
Allow from all |
| 77 |
</Directory> |
| 78 |
<Directory ~ "/var/files/git-mirror/.*\.workdir"> |
| 79 |
Order allow,deny |
| 80 |
Deny from all |
| 81 |
</Directory> |
| 82 |
<Directory ~ "/var/files/git-mirror/__.*"> |
| 83 |
Order allow,deny |
| 84 |
Deny from all |
| 85 |
</Directory> |
| 86 |
|
| 87 |
ErrorLog /var/log/apache2/code-error.log |
| 88 |
CustomLog /var/log/apache2/code-access.log vhost_combined |
| 89 |
|
| 90 |
LogLevel warn |
| 91 |
ServerSignature Off |
| 92 |
|
| 93 |
</VirtualHost> |
| 94 |
|