Sha256: b488401e0df606d851617c0d8998051c70f4f9f14ee8f56f20763b1f1ebdb093

Contents?: true

Size: 1.41 KB

Versions: 20

Compression:

Stored size: 1.41 KB

Contents

<VirtualHost *:80>
  ServerName <%= apache_vhost_domain %>
<% apache_vhost_server_alii.each do |server_alias| -%>
  ServerAlias <%= server_alias %>
<% end -%>

<% if apache_vhost_canonicalize_hostname -%>
  # Redirect to canonical hostname
  RewriteEngine On
  RewriteCond %{HTTP_HOST}   !^<%= apache_vhost_domain.sub('.','\.') %> [NC]
  RewriteCond %{HTTP_HOST}   !^$
  RewriteRule ^/?(.*)         http://<%= apache_vhost_domain %>/$1 [L,R=301,NE]
<% end -%>

  DocumentRoot <%= "#{apache_vhost_document_root}" %>

  ErrorLog <%= apache_vhost_error_log %>
  CustomLog <%= apache_vhost_access_log %> <%= apache_vhost_access_log_type %>

<% if apache_vhost_rack_env -%>
  RackEnv <%= apache_vhost_rack_env %>
<% end -%>

  <Directory <%= "#{apache_vhost_document_root}" %>>
    DirectoryIndex index.html index.htm index.php
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>

  RewriteEngine On

  # Prevent access to .svn directories
  RewriteRule ^(.*/)?\.svn/ - [F,L]
  ErrorDocument 403 "Access Forbidden"

  # Prevent access to .git directories
  RewriteRule ^(.*/)?\.git/ - [F,L]
  ErrorDocument 403 "Access Forbidden"
  
  # Deflate
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

</VirtualHost>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
deprec-3.1.0.rc16 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc15 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc13 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc12 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc11 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc10 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc9 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc8 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc7 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc6 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc5 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc4 lib/deprec/templates/apache/vhost.erb
deprec-3.1.0.rc3 lib/deprec/cap/templates/apache/vhost.erb
deprec-3.1.0.rc2 lib/deprec/cap/templates/apache/vhost.erb
deprec-3.1.0.rc1 lib/deprec/cap/templates/apache/vhost.erb
deprec-2.2.3 lib/deprec/templates/apache/vhost.erb
deprec-2.2.2 lib/deprec/templates/apache/vhost.erb
deprec-2.2.1 lib/deprec/templates/apache/vhost.erb
deprec-2.2.0 lib/deprec/templates/apache/vhost.erb
deprec-2.1.19 lib/deprec/templates/apache/vhost.erb