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 / dockertest / code.conf @ 1572:2b1b8ebb7d98

History | View | Annotate | Download (2.66 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
		SoundSoftwareSslRequired "on"
65
		Options +ExecCGI
66
		AddHandler cgi-script .cgi
67
		ExpiresDefault now
68
        </Location>
69
70
	Alias /git "/var/files/git-mirror"
71
72
	<Directory "/var/files/git-mirror">
73
		Options -Indexes +FollowSymLinks
74
                Order allow,deny
75
                Allow from all
76
	</Directory>
77
	<Directory ~ "/var/files/git-mirror/.*\.workdir">
78
		Order allow,deny
79
		Deny from all
80
	</Directory>
81
	<Directory ~ "/var/files/git-mirror/__.*">
82
                Order allow,deny
83
                Deny from all
84
	</Directory>
85
86
	ErrorLog /var/log/apache2/code-error.log
87
	CustomLog /var/log/apache2/code-access.log vhost_combined
88
89
        LogLevel warn
90
        ServerSignature Off
91
92
</VirtualHost>