Commit 090ba9a2 authored by Patrick J Cherry's avatar Patrick J Cherry
Browse files

httpd: Updated templates to use IfModule

parent f69559b0
......@@ -39,14 +39,16 @@
#
DocumentRoot <%= htdocs_directory %>/
#
# General CGI Handling
#
ScriptAlias /cgi-bin/ <%= cgibin_directory %>/
<IfModule mod_cgi.c>
#
# General CGI Handling
#
ScriptAlias /cgi-bin/ <%= cgibin_directory %>/
<Location /cgi-bin>
Options +ExecCGI
</Location>
<Location /cgi-bin>
Options +ExecCGI
</Location>
</IfModule>
#
# Disable indexes by default on the top-level.
......
......@@ -32,29 +32,30 @@
<%= server_aliases %>
SSLEngine On
<IfModule mod_ssl.c>
SSLEngine On
#
# The certificate, key, and intermediate bundle (if needed)
#
<%= ssl_config %>
#
# The certificate, key, and intermediate bundle (if needed)
#
<%= ssl_config %>
#
# Sane SSL ciphers.
#
SSLCipherSuite ALL:!LOW:!SSLv2:!EXP:!aNULL
#
# Sane SSL ciphers.
#
SSLCipherSuite ALL:!LOW:!SSLv2:!EXP:!aNULL
#
# Ban ancient protocols
#
SSLProtocol ALL -SSLv2 -SSLv3
#
# And some options
#
SSLOptions +StrictRequire
#
# Ban ancient protocols
#
SSLProtocol ALL -SSLv2 -SSLv3
#
# And some options
#
SSLOptions +StrictRequire
</IfModule>
#
# Allow users to override settings via .htaccess
......@@ -68,14 +69,16 @@
#
DocumentRoot <%= htdocs_directory %>/
#
# General CGI Handling
#
ScriptAlias /cgi-bin/ <%= cgibin_directory %>/
<IfModule mod_cgi.c>
#
# General CGI Handling
#
ScriptAlias /cgi-bin/ <%= cgibin_directory %>/
<Location /cgi-bin>
Options +ExecCGI
</Location>
<Location /cgi-bin>
Options +ExecCGI
</Location>
</IfModule>
#
# Disable indexes by default on the top-level.
......@@ -110,14 +113,14 @@
#
<%= server_aliases %>
% if mandatory_ssl?
#
# All accesses redirect to the HTTPS version of
# the site.
#
Redirect / https://<%= domain %>/
<IfModule mod_alias.c>
#
# All accesses redirect to the HTTPS version of
# the site.
#
Redirect / https://<%= domain %>/
</IfModule>
% else
#
......@@ -132,14 +135,16 @@
#
DocumentRoot <%= htdocs_directory %>/
#
# General CGI Handling
#
ScriptAlias /cgi-bin/ <%= cgibin_directory %>/
<IfModule mod_cgi.c>
#
# General CGI Handling
#
ScriptAlias /cgi-bin/ <%= cgibin_directory %>/
<Location /cgi-bin>
Options +ExecCGI
</Location>
<Location /cgi-bin>
Options +ExecCGI
</Location>
</IfModule>
#
# Disable indexes by default
......
......@@ -12,26 +12,28 @@
<VirtualHost <%= ips.collect{|ip| ip+":443"}.join(" ") %>>
#
# Ensure that the SSL options are configured.
#
SSLEngine On
<%= ssl_config %>
#
# Sane SSL ciphers.
#
SSLCipherSuite ALL:!LOW:!SSLv2:!EXP:!aNULL
#
# Ban ancient protocols
#
SSLProtocol ALL -SSLv2 -SSLv3
#
# And some options
#
SSLOptions +StrictRequire
<IfModule mod_ssl.c>
#
# Ensure that the SSL options are configured.
#
SSLEngine On
<%= ssl_config %>
#
# Sane SSL ciphers.
#
SSLCipherSuite ALL:!LOW:!SSLv2:!EXP:!aNULL
#
# Ban ancient protocols
#
SSLProtocol ALL -SSLv2 -SSLv3
#
# And some options
#
SSLOptions +StrictRequire
</IfModule>
#
# This is the directory people are redirected to
......@@ -51,7 +53,6 @@
ErrorDocument 403 /bytemark/
</LocationMatch>
#
# Allow users to override settings via .htaccess
#
......@@ -59,38 +60,42 @@
AllowOverride all
</Directory>
#
# We will allow global CGIs without any effort though.
#
AddHandler cgi-script .cgi
<IfModule mod_cgi.c>
#
# We will allow global CGIs without any effort though.
#
AddHandler cgi-script .cgi
</IfModule>
#
# Disable the "single" name for this server.
#
UseCanonicalName Off
#
# Aliases for testing sites prior to DNS migration.
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)\.testing\.(.*)$
RewriteRule ^/(.*)$ /srv/%1/public/htdocs/$1
#
# The document root + CGI-directories.
#
VirtualDocumentRoot /srv/%0/public/htdocs/
VirtualScriptAlias /srv/%0/public/cgi-bin/
#
# Update documentroot settings for each vhost.
#
SetVirtualDocumentRoot on
<IfModule mod_rewrite.c>
#
# Aliases for testing sites prior to DNS migration.
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)\.testing\.(.*)$
RewriteRule ^/(.*)$ /srv/%1/public/htdocs/$1
</IfModule>
<IfModule mod_bytemark_vhost.c>
#
# The document root + CGI-directories.
#
VirtualDocumentRoot /srv/%0/public/htdocs/
<IfModule mod_cgi.c>
VirtualScriptAlias /srv/%0/public/cgi-bin/
</IfModule>
#
# Update documentroot settings for each vhost.
#
SetVirtualDocumentRoot on
</IfModule>
#
# We need to log the virtual hostname the incoming request was
......
......@@ -21,7 +21,6 @@
AllowOverride All
</Directory>
#
# And this makes that redirection happen.
#
......@@ -30,7 +29,6 @@
ErrorDocument 403 /bytemark/
</LocationMatch>
#
# Allow users to override settings via .htaccess
#
......@@ -38,38 +36,41 @@
AllowOverride all
</Directory>
#
# We will allow global CGIs without any effort though.
#
AddHandler cgi-script .cgi
<IfModule mod_cgi.c>
#
# We will allow global CGIs without any effort though.
#
AddHandler cgi-script .cgi
</IfModule>
#
# Disable the "single" name for this server.
#
UseCanonicalName Off
#
# Aliases for testing sites prior to DNS migration.
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)\.testing\.(.*)$
RewriteRule ^/(.*)$ /srv/%1/public/htdocs/$1
#
# The document root + CGI-directories.
#
VirtualDocumentRoot /srv/%0/public/htdocs/
VirtualScriptAlias /srv/%0/public/cgi-bin/
#
# Update documentroot settings for each vhost.
#
SetVirtualDocumentRoot on
<IfModule mod_rewrite.c>
#
# Aliases for testing sites prior to DNS migration.
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)\.testing\.(.*)$
RewriteRule ^/(.*)$ /srv/%1/public/htdocs/$1
</IfModule>
<IfModule mod_bytemark_vhost.c>
#
# The document root + CGI-directories.
#
VirtualDocumentRoot /srv/%0/public/htdocs/
<IfModule mod_cgi.c>
VirtualScriptAlias /srv/%0/public/cgi-bin/
</IfModule>
#
# Update documentroot settings for each vhost.
#
SetVirtualDocumentRoot on
</IfModule>
#
# We need to log the virtual hostname the incoming request was
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment