To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / extra / soundsoftware / scripted-deploy / config / code.conf @ 1586:d0d59d12db94

History | View | Annotate | Download (2.72 KB)

1 1570:ae2f71010562 Chris
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 1571:4c2b25b7e85f Chris
	PassengerFriendlyErrorPages on
18 1570:ae2f71010562 Chris
        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 1576:d1de6986e429 Chris
                #!!! "on" in production please!:
65
                SoundSoftwareSslRequired "off"
66 1570:ae2f71010562 Chris
		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>