Skip to content

Main page for Vamp Plugins site with dynamic download page from RDF

Notifications You must be signed in to change notification settings

vamp-plugins/vamp-rdf-download-index

Repository files navigation

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>

About

Main page for Vamp Plugins site with dynamic download page from RDF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published