All pastes #799703 Raw Edit

Unnamed

public text v1 · immutable
#799703 ·published 2007-11-27 20:50 UTC
rendered paste body
NameVirtualHost *

userdir public_html

SetEnv RAILS_ENV production
ServerName www.anthillz.com
ServerAdmin kshah@anthillz.com
ServerSignature On
ErrorLog /var/log/apache2/anthillz.error.log
CustomLog /var/log/apache2/anthillz.access.log combined
LogLevel warn
	
<VirtualHost *:80>
	DocumentRoot /var/www/
	SSLVerifyClient none

	<Directory /var/www/anthillz/public/>
		Options ExecCGI FollowSymLinks
		AddHandler fcgid-script .fcgi
		Order allow,deny
		Allow from all
		RewriteEngine On
		RewriteRule ^/(.*):SSL$ https://%{SERVER_NAME}/$1 [R,L]
		RewriteRule ^/(.*):NOSSL$ http://%{SERVER_NAME}/$1 [R,L]
		RewriteRule ^$ index.html [QSA]
		RewriteRule ^([^.]+)$ $1.html [QSA]
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteRule ^(.*)$ /dispatch.fcgi?$1 [QSA,L]
		AllowOverride None
	</Directory>
</VirtualHost>

<VirtualHost _default_:443>
	SSLEngine on
	SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
	SSLCertificateFile /etc/ssl/certs/server.crt
	SSLCertificateKeyFile /etc/ssl/private/server.key

	DocumentRoot /var/www/

	<Directory /var/www/anthillz/public/>
		Options ExecCGI FollowSymLinks
		AddHandler fcgid-script .fcgi
		Order allow,deny
		Allow from all
		RewriteEngine On
		RewriteRule ^/(.*):SSL$ https://%{SERVER_NAME}/$1 [R,L]
		RewriteRule ^/(.*):NOSSL$ http://%{SERVER_NAME}/$1 [R,L]
		RewriteRule ^$ index.html [QSA]
		RewriteRule ^([^.]+)$ $1.html [QSA]
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteRule ^(.*)$ /dispatch.fcgi?$1 [QSA,L]
		AllowOverride None
	</Directory>
</VirtualHost>