Skip to content

Instantly share code, notes, and snippets.

@andrewroth
Created January 26, 2009 16:39
Show Gist options
  • Save andrewroth/52860 to your computer and use it in GitHub Desktop.
Save andrewroth/52860 to your computer and use it in GitHub Desktop.
--(/etc/apache2/sites-enabled)-------------------------(andrew@pat:/dev/pts/0)--
--(11:38)-- $ cat pat.powertochange.org
<VirtualHost *:80>
ServerName pat.powertochange.org
ServerAlias www.pat.powertochange.org
Redirect 301 / https://pat.powertochange.org
</VirtualHost>
<VirtualHost 192.168.240.175:443>
ServerName pat.powertochange.org
ServerAlias www.pat.powertochange.org
DocumentRoot /var/www/pat.powertochange.org/current/public
RailsEnv production
PassengerDefaultUser www-data
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
RewriteEngine On
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SSLEngine on
SSLProtocol +all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM
SSLCertificateFile /etc/apache2/certs/pat.powertochange.org.cert
SSLCertificateKeyFile /etc/apache2/certs/pat.powertochange.org.key
</VirtualHost>
--(/etc/apache2/sites-enabled)-------------------------(andrew@pat:/dev/pts/0)--
--(11:39)-- $ cat mpdtool.powertochange.org
<VirtualHost *:80>
ServerName mpdtool.powertochange.org
ServerAlias www.mpdtool.powertochange.org
Redirect 301 / https://mpdtool.powertochange.org
</VirtualHost>
<VirtualHost 192.168.240.175:443>
ServerName mpdtool.powertochange.org
ServerAlias www.mpdtool.powertochange.org
DocumentRoot /var/www/mpdtool.powertochange.org/current/public
RailsEnv production
PassengerDefaultUser www-data
Options +FollowSymlinks
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
RewriteEngine On
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SSLEngine on
SSLProtocol +all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM
SSLCertificateFile /etc/apache2/certs/powertochange.org.cert
SSLCertificateKeyFile /etc/apache2/certs/powertochange.org.key
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment