Created
December 10, 2012 21:49
-
-
Save djcas9/4253683 to your computer and use it in GitHub Desktop.
Snorby.org Apache Virtual Host Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost *:80 | |
# | |
# SSL | |
# | |
SSLCertificateFile /etc/apache2/pki/tls/certs/server.crt | |
SSLCertificateKeyFile /etc/apache2/pki/tls/private/server.key | |
SSLProtocol -all +TLSv1 +SSLv3 | |
SSLCipherSuite HIGH:!aNULL:-MD5 | |
SSLOptions +StrictRequire | |
<VirtualHost *:80> | |
ServerName snorby.org | |
ServerAlias www.snorby.org | |
Redirect permanent / https://snorby.org/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName snorby.org | |
ServerAlias www.snorby.org | |
Serveradmin support@snorby.org | |
DocumentRoot /var/www/apps/opensnorby/current/public | |
ErrorLog /var/www/apps/opensnorby/current/log/opensnorby.log | |
RailsEnv production | |
SSLEngine on | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
SSLRequireSSL | |
</Directory> | |
# compress text, html, javascript, css, xml: | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript | |
# Or, compress certain file types by extension: | |
<Files *.html> | |
SetOutputFilter DEFLATE | |
</Files> | |
ExpiresActive On | |
<Directory "/var/www/apps/demo/snorby/public/assets"> | |
ExpiresDefault "access plus 1 year" | |
</Directory> | |
<Directory "/var/www/apps/demo/snorby/public/images"> | |
ExpiresDefault "access plus 1 year" | |
</Directory> | |
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$"> | |
Header unset Last-Modified | |
Header set Expires "Fri, 21 Dec 2012 00:00:00 GMT" | |
Header set Cache-Control "public, no-transform" | |
</FilesMatch> | |
<Directory /var/www/apps/opensnorby/current/public> | |
AllowOverride all | |
Order allow,deny | |
Allow from all | |
Options All -MultiViews | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment