Sha256: b72dc459c41330a5919b76311a7e00941589c58842d112ce082401b2199f5cab

Contents?: true

Size: 1.64 KB

Versions: 31

Compression:

Stored size: 1.64 KB

Contents

<% project = fetch :project -%>
<VirtualHost *:80>
    ServerName <%= fetch :domain %>
    Redirect permanent / https://<%= fetch :domain -%>/
  </VirtualHost>

  <VirtualHost *:443>
    PassengerFriendlyErrorPages off
    PassengerAppEnv <%= fetch :stage %>
    PassengerRuby /usr/local/rvm/wrappers/ruby-<%= fetch :rvm_ruby_version -%>/ruby
    # Always have at least 1 process in existence for the application
    PassengerMinInstances 1

    ServerName <%= fetch :domain %>

    SSLEngine On
    SSLCertificateFile <%= project.ssl_certificate_file(fetch(:stage).to_sym) %>
    SSLCertificateChainFile <%= project.ssl_certificate_chain_file(fetch(:stage).to_sym) %>
    SSLCertificateKeyFile <%= project.ssl_certificate_key_file(fetch(:stage).to_sym) %>

    DocumentRoot <%= fetch :deploy_to -%>/current/public
    RailsBaseURI /
    PassengerDebugLogFile /var/log/httpd/passenger.log

    <Directory <%= fetch :deploy_to -%>/current/public >
      Allow from all
      Options -MultiViews
    </Directory>

    AddOutputFilterByType DEFLATE text/html text/css application/javascript

    RewriteEngine On

    # Show maintenance page if it exists
    ErrorDocument 503 /system/maintenance.html
    RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$
    RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
    RewriteCond %{SCRIPT_FILENAME} !maintenance.html
    RewriteRule ^.*$  -  [redirect=503,last]

    <Location /assets/>
      # RFC says only cache for 1 year
      ExpiresActive On
      ExpiresDefault \"access plus 1 year\"
    </Location>
  </VirtualHost>

# Start the application before the first access
PassengerPreStart https://<%= fetch :domain -%>:443/

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
groundskeeper-bitcore-0.32.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.31.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.29.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.28.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.27.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.26.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.24.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.23.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.22.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.21.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.20.1 config/vhost_config.conf.erb
groundskeeper-bitcore-0.19.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.18.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.17.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.16.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.15.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.14.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.13.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.12.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.11.0 config/vhost_config.conf.erb