Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

174 lines (135 sloc) 6.279 kb
#Apache configuration for MYDLjE
# Move the content of this file to the virtual host
# configuration file for better performance.
#Set some Variables for MOJO
#Development:
#SetEnv MOJO_RELOAD 1
SetEnv MOJO_MODE development
#Production:
#touch the script to restart the appliaction in fastcgi or
#SetEnv MOJO_RELOAD 0
#SetEnv MOJO_MODE production
#disable generating directory indexes, automatically( mod_autoindex )
IndexOptions -FancyIndexing
# Make sure that directory listings are disabled (Apache 1)
Options -Indexes +ExecCGI
#Uncomment "IfModule !mod_fastcgi.c/IfModule" to prefer fastcgi
#<IfModule !mod_fastcgi.c>
#set explicitly filenames as cgi scripts
<Files ~ "^(mydlje|cpanel|site)$">
SetHandler cgi-script
</Files>
#</IfModule>
#Uncomment "IfModule mod_fastcgi.c/IfModule"
#and lines in between to prefer fastcgi
#<IfModule mod_fastcgi.c>
# <Files ~ "(mydlje|cpanel|site)$">
# SetHandler fastcgi-script
# </Files>
#</IfModule>
DirectoryIndex index.xhtml index.html site
# Redefine the mime type for the most common types of scripts
AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi
#Below additions are from HTML-BOILERPLATE project with some modifications
# see http://html5boilerplate.com/
# ----------------------------------------------------------------------
# Better website experience for IE users
# ----------------------------------------------------------------------
# Force the latest IE version, in various cases when it may fall back to IE7 mode
# github.com/rails/rails/commit/123eb25#commitcomment-118920
# Use ChromeFrame if it's installed for a better experience for the poor IE folk
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
BrowserMatch MSIE ie
Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
</IfModule>
</IfModule>
<IfModule mod_headers.c>
# Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
# We need to inform proxies that content changes based on UA
Header append Vary User-Agent
# Cache control is set only if mod_headers is enabled, so that's unncessary to declare
</IfModule>
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
# these are pretty far-future expires headers
# they assume you control versioning with cachebusting query params like
# <script src="application.js?20100608">
# additionally, consider that outdated proxies may miscache
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
# if you don't use filenames to version, lower the css and js to something like
# "access plus 1 week" or so
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 week"
# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# your document html
ExpiresByType text/html "access plus 0 seconds"
# data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# rss feed
ExpiresByType application/rss+xml "access plus 1 hour"
# favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# media: images, video, audio
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType video/ogg "access plus 1 week"
ExpiresByType audio/ogg "access plus 1 week"
ExpiresByType video/mp4 "access plus 1 week"
ExpiresByType video/webm "access plus 1 week"
# htc files (css3pie)
ExpiresByType text/x-component "access plus 1 week"
# webfonts
ExpiresByType font/truetype "access plus 1 week"
ExpiresByType font/opentype "access plus 1 week"
ExpiresByType font/woff "access plus 1 week"
ExpiresByType image/svg+xml "access plus 1 week"
ExpiresByType application/vnd.ms-fontobject "access plus 1 week"
# css and javascript
ExpiresByType text/css "access plus 2 weeks"
ExpiresByType application/javascript "access plus 2 weeks"
ExpiresByType text/javascript "access plus 2 weeks"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
# Since we're sending far-future expires, we don't need ETags for
# static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
# ----------------------------------------------------------------------
# Stop screen flicker in IE on CSS rollovers
# ----------------------------------------------------------------------
# The following directives stop screen flicker in IE on CSS rollovers - in
# combination with the "ExpiresByType" rules for images (see above). If
# needed, un-comment the following rules.
# BrowserMatch "MSIE" brokenvary=1
# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
# BrowserMatch "Opera" !brokenvary
# SetEnvIf brokenvary 1 force-no-vary
# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------
# use utf-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8
# force utf-8 for a number of file formats
AddCharset utf-8 .xhtml .html .css .js .xml .json .rss
#Use 'LogLevel debug' in your virtual host config file to get a backtrace.
# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
#<IfModule mod_rewrite.c>
# RewriteEngine On
# RewriteBase /MYDLjE/
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule (.*) site/$1 [L]
# RewriteRule "(^|/)\." - [F]
#</IfModule>
Jump to Line
Something went wrong with that request. Please try again.