Sha256: 5088ad724beb9ffbb6a02bf2f1ec630d5481769d494b055f37eac9a986782cd3

Contents?: true

Size: 1.57 KB

Versions: 12

Compression:

Stored size: 1.57 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

12 entries across 12 versions & 1 rubygems

Version Path
groundskeeper-bitcore-0.3.3 config/vhost_config.conf.erb
groundskeeper-bitcore-0.3.2 config/vhost_config.conf.erb
groundskeeper-bitcore-0.3.1 config/vhost_config.conf.erb
groundskeeper-bitcore-0.3.0 config/vhost_config.conf.erb
groundskeeper-bitcore-0.2.7 config/vhost_config.conf.erb
groundskeeper-bitcore-0.2.6 config/vhost_config.conf.erb
groundskeeper-bitcore-0.2.5 config/vhost_config.conf.erb
groundskeeper-bitcore-0.2.4 config/vhost_config.conf.erb
groundskeeper-bitcore-0.2.3 config/vhost_config.conf.erb
groundskeeper-bitcore-0.2.2 config/vhost_config.conf.erb
groundskeeper-bitcore-0.2.1 config/vhost_config.conf.erb
groundskeeper-bitcore-0.2.0 config/vhost_config.conf.erb