Sha256: f0adfd913d6b5072355a41b497038a807f2e1ad0dfbd459948eaa28fe0e99a08

Contents?: true

Size: 1.83 KB

Versions: 14

Compression:

Stored size: 1.83 KB

Contents

<IfModule passenger_module> 
    <VirtualHost *:80>

        ServerName <%= domain %>
        <%- Array(passenger_server_alii).each do |server_alias| -%>
        ServerAlias <%= server_alias %>
        <%- end -%>

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

        DocumentRoot <%= passenger_document_root %>
        <Directory <%= passenger_document_root %>>
            Allow from all
            Options -MultiViews
        </Directory>

        CustomLog <%= apache_log_dir %>/<%= application %>-access.log combined
        ErrorLog <%= apache_log_dir %>/<%= application %>-error.log
	  
        RackEnv <%= rack_env %>
        RailsEnv <%= rack_env %>

        # Enable caching of assets containing a fingerprint
        # Browsers need never check for newer versions of an
        # asset because the fingerprint would be different.
        <FilesMatch "/assets/[^.]+-[a-z0-9]{32}\.">
            # Add far-future expiration dates
            <IfModule mod_expires.c>
                ExpiresActive On
                ExpiresDefault "access plus 10 years"
            </IfModule>
            # Disable ETags
            <IfModule mod_expires.c>
                Header unset "ETag"
            </IfModule>
        </FilesMatch>

        # Check for maintenance file and redirect all requests
        RewriteEngine On
        RewriteCond %{REQUEST_URI} !\.(css|jpg|png|gif)$
        RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
        RewriteCond %{SCRIPT_FILENAME} !maintenance.html
        RewriteRule ^.*$ /system/maintenance.html [L]

    </VirtualHost>
</IfModule>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
deprec-3.1.0.rc11 lib/deprec/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc10 lib/deprec/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc9 lib/deprec/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc8 lib/deprec/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc7 lib/deprec/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc6 lib/deprec/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc5 lib/deprec/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc4 lib/deprec/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc3 lib/deprec/cap/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc2 lib/deprec/cap/templates/passenger/apache_vhost.erb
deprec-3.1.0.rc1 lib/deprec/cap/templates/passenger/apache_vhost.erb
deprec-2.2.3 lib/deprec/templates/passenger/apache_vhost.erb
deprec-2.2.2 lib/deprec/templates/passenger/apache_vhost.erb
deprec-2.2.1 lib/deprec/templates/passenger/apache_vhost.erb