<VirtualHost *:80>
	ServerName redalpha
	<IfModule mod_passenger.c>
		# this is the passenger config
		RailsEnv production
		RailsBaseURI /
		SetEnv X_DEBIAN_SITEID "redalpha"
		Alias "/plugin_assets/" /var/cache/redmine/redalpha/plugin_assets/
		DocumentRoot /usr/share/redmine/public
		<Directory "/usr/share/redmine/public">
			Order allow,deny
			Allow from all
		</Directory>
	</IfModule>
	<IfModule mod_fcgid.c>
		# DefaultInitEnv for module mod_fcgid
		DefaultInitEnv RAILS_RELATIVE_URL_ROOT ""
		DefaultInitEnv X_DEBIAN_SITEID "redalpha"

		Alias "/plugin_assets/" /var/cache/redmine/redalpha/plugin_assets/
		DocumentRoot /usr/share/redmine/public
		<Directory "/usr/share/redmine/public">
			Options +FollowSymLinks +ExecCGI
			Order allow,deny
			Allow from all
			RewriteEngine On
			RewriteRule ^$ index.html [QSA]
			RewriteRule ^([^.]+)$ $1.html [QSA]
			RewriteCond %{REQUEST_FILENAME} !-f [OR]
			RewriteCond %{REQUEST_FILENAME} dispatch.fcgi$
			RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
		</Directory>
	</IfModule>
</VirtualHost>
