-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
122 lines (91 loc) · 3.6 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Vamp Website Layout
-------------------
Most of the site is served through a small Spark Java application,
whose code is found in this repo. The purpose of this application is
to serve the dynamically generated plugin download page, but for
convenience it is also configured to serve up the static HTML content
(found in the public/ subrepo) and static RDF data (rdf/ subrepo).
This means the Apache front-end server should be configured to pass
everything through to the Spark server on a local port, except for the
forum (PHP to be run by Apache) and the wiki (redirecting to the
SoundSoftware code site, we no longer host a wiki locally).
That is, these are handled by Spark as long as Apache passes / through
to it appropriately:
/ Static content served through Spark
/download.html Dynamic content generated by Spark
But these need to be overridden by Apache before reaching Spark:
/rdf Static content served by Apache (plus index pages etc)
/forum Dynamic PHP content
/wiki Redirect
Outline Apache config
---------------------
<VirtualHost *:80>
ServerName vamp-plugins.org
ServerAlias www.vamp-plugins.org
# Avoid serving anything unwarranted because of a forgotten
# alias or proxypass, by making the root be the public dir
DocumentRoot /var/www/vamp-plugins.org/public
<Directory /var/www/vamp-plugins.org/public>
Options None
AllowOverride None
Order allow,deny
Allow from all
# Permit short cache to speed navigation and assist
# the HTTP accelerator. The SMF forum overrides this
# with its own Expires header.
ExpiresDefault "access plus 1 minute"
</Directory>
<DirectoryMatch "^/.*/\.svn/">
Order allow,deny
Deny from all
Satisfy All
</DirectoryMatch>
<DirectoryMatch "^/.*/\.hg/">
Order allow,deny
Deny from all
Satisfy All
</DirectoryMatch>
# Exclude static rdf directory from the subsequent ProxyPass
ProxyPass /rdf !
# Exclude the PHP forum from the subsequent ProxyPass
ProxyPass /forum !
# Exclude the wiki redirect from the subsequent ProxyPass
ProxyPass /wiki !
# Everything not excluded above gets served by Spark app
ProxyPass / http://localhost:4567/
# RDF dir we serve as a set of static files, but we enable
# *.n3 to be accessed without the .n3 extension so as to
# resolve the URIs of plugin resources
Alias /rdf /var/www/vamp-plugins.org/rdf
<Directory /var/www/vamp-plugins.org/rdf>
AddType application/rdf+xml .rdf
AddType application/rdf+xml .rdfs
AddType text/rdf+n3 .n3
DirectoryIndex vamp.rdf
Options +FollowSymLinks
RewriteEngine on
RewriteBase /rdf
RewriteRule ^([^/]+)/([^\.]+)$ $1/$2.n3
ExpiresDefault "access plus 5 minutes"
</Directory>
# Directory index allowed on plugin RDF dir
<Directory /var/www/vamp-plugins.org/rdf/plugins>
Options +Indexes
ExpiresDefault "access plus 5 minutes"
</Directory>
# Forum is a PHP application which we run through FCGI
Alias /forum /var/www/vamp-plugins.org/forum
<Directory /var/www/vamp-plugins.org/forum>
AddHandler fcgid-script .php
FCGIWrapper /usr/lib/cgi-bin/php5 .php
Options +ExecCGI
Options -MultiViews
</Directory>
# Wiki is a redirect to the SoundSoftware code site
Redirect seeother /wiki http://code.soundsoftware.ac.uk/projects/vamp-plugin-sdk/wiki
ErrorLog /var/log/httpd/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
ServerSignature Off
</VirtualHost>