Sha256: ea865e96a00c72667489b0e454070cfebe06af7ae25410a56d4717138c75b33c

Contents?: true

Size: 1.54 KB

Versions: 80

Compression:

Stored size: 1.54 KB

Contents

<%
  @path = "/etc/apache2/sites-available/#{rubber_env.app_name}-passenger"
  @post = "a2enmod rewrite && a2enmod ssl && a2ensite #{rubber_env.app_name}-passenger"
%>

<% [rubber_env.passenger_listen_port, rubber_env.passenger_listen_ssl_port].each do |port| %>

Listen <%= port %>
<VirtualHost *:<%= port %>>
  ServerName      <%= rubber_env.domain %>
<%- if rubber_env.web_aliases -%>
  ServerAlias	    <%= rubber_env.web_aliases.join(" ") %>
<%- end -%>
  DocumentRoot    <%= RUBBER_ROOT + "/public" %>

  ErrorDocument 404 /404.html
  ErrorDocument 500 /500.html

  SetEnvIf User-Agent "^(.*MSIE.*)|(.*AppleWebKit.*)$" nokeepalive

  RailsEnv  <%= RUBBER_ENV %>
  RailsAllowModRewrite on

  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^<%= rubber_env.domain %>$
  RewriteRule ^(.*)$ http://www.<%= rubber_env.domain %>$1 [R,L]

  # Include <%= RUBBER_ROOT %>/config/apache/rewrites.conf

  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html  
  RewriteRule ^.*$ /system/maintenance.html [L]
  
  <% if port == rubber_env.passenger_listen_ssl_port %>
  SSLEngine on
  SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  # SSLCertificateFile <%= RUBBER_ROOT %>/config/<%= rubber_env.domain %>.crt
  # SSLCertificateKeyFile <%= RUBBER_ROOT %>/config/<%= rubber_env.domain %>.key
  # SSLCertificateChainFile /etc/ssl/certs/gd_intermediate_bundle.crt
  <% end %>

</VirtualHost>

<% end %>

Version data entries

80 entries across 56 versions & 6 rubygems

Version Path
sml-rubber-0.9.10 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
sml-rubber-0.9.11 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
sml-rubber-0.9.13 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
wr0ngway-rubber-1.0.0 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
wr0ngway-rubber-1.0.1 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
axtro-rubber-1.2.3 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
axtro-rubber-1.2.2 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
nogara-rubber-1.7.2 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
nogara-rubber-1.7.2 lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.7.2 lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.7.2 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.7.1 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.7.1 lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.7.0 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.7.0 lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.6.3 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.6.3 lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.6.2 lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.6.2 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
rubber-1.6.1 generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf