Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 174 lines (135 sloc) 6.279 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
#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>
 

Something went wrong with that request. Please try again.