Updated all templates to use instance variables
This commit is contained in:
parent
a0c854d3c0
commit
dc51af1ca2
113 changed files with 527 additions and 522 deletions
|
@ -193,7 +193,7 @@ HostnameLookups Off
|
|||
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||
# container, that host's errors will be logged there and not here.
|
||||
#
|
||||
ErrorLog /srv/www/log/http/<%= homename %>/error_log
|
||||
ErrorLog /srv/www/log/http/<%= @homename %>/error_log
|
||||
|
||||
#
|
||||
# LogLevel: Control the number of messages logged to the error_log.
|
||||
|
@ -225,7 +225,7 @@ LogFormat "%{User-agent}i" agent
|
|||
|
||||
#
|
||||
# Define an access log for VirtualHosts that don't define their own logfile
|
||||
CustomLog /srv/www/log/http/<%= homename %>/access_log combined
|
||||
CustomLog /srv/www/log/http/<%= @homename %>/access_log combined
|
||||
|
||||
|
||||
# Include of directories ignores editors' and dpkg's backup files,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<% if has_variable?("domain") -%>
|
||||
<% if @domain -%>
|
||||
#
|
||||
# ServerAdmin: Your address, where problems with the server should be
|
||||
# e-mailed. This address appears on some server-generated pages, such
|
||||
# as error documents. e.g. admin@your-domain.com
|
||||
#
|
||||
ServerAdmin adm@<%= domain %>
|
||||
ServerAdmin adm@<%= @domain %>
|
||||
<% end -%>
|
||||
|
||||
#
|
||||
|
@ -19,7 +19,7 @@ ServerAdmin adm@<%= domain %>
|
|||
# You will have to access it by its address anyway, and this will make
|
||||
# redirections work in a sensible way.
|
||||
#
|
||||
ServerName <%= homename %>
|
||||
ServerName <%= @homename %>
|
||||
|
||||
#
|
||||
# UseCanonicalName: Determines how Apache constructs self-referencing
|
||||
|
|
|
@ -13,7 +13,7 @@ LoadModule auth_kerb_module modules/mod_auth_kerb.so
|
|||
# "www.example.com" is the FQDN of this server.
|
||||
#
|
||||
|
||||
KrbAuthRealms <%= kerberos_realm %>
|
||||
KrbAuthRealms <%= @kerberos_realm %>
|
||||
Krb5KeyTab /etc/httpd/conf/httpsd.keytab
|
||||
KrbMethodNegotiate On
|
||||
KrbAuthoritative On
|
||||
|
|
|
@ -193,7 +193,7 @@ LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
|||
LoadModule cache_module modules/mod_cache.so
|
||||
LoadModule suexec_module modules/mod_suexec.so
|
||||
LoadModule disk_cache_module modules/mod_disk_cache.so
|
||||
<% if ['CentOS','RedHat'].index(operatingsystem) and operatingsystemrelease =~ /^[1-5]\./ -%>
|
||||
<% if ['CentOS','RedHat'].index(@operatingsystem) and @operatingsystemrelease =~ /^[1-5]\./ -%>
|
||||
LoadModule file_cache_module modules/mod_file_cache.so
|
||||
LoadModule mem_cache_module modules/mod_mem_cache.so
|
||||
<% end -%>
|
||||
|
@ -245,13 +245,13 @@ Group <%= scope.lookupvar('apache::server::group') %>
|
|||
# virtual host being defined.
|
||||
#
|
||||
|
||||
<% if has_variable?("domain") -%>
|
||||
<% if @domain -%>
|
||||
#
|
||||
# ServerAdmin: Your address, where problems with the server should be
|
||||
# e-mailed. This address appears on some server-generated pages, such
|
||||
# as error documents. e.g. admin@your-domain.com
|
||||
#
|
||||
ServerAdmin adm@<%= domain %>
|
||||
ServerAdmin adm@<%= @domain %>
|
||||
<% end -%>
|
||||
|
||||
#
|
||||
|
@ -267,7 +267,7 @@ ServerAdmin adm@<%= domain %>
|
|||
# redirections work in a sensible way.
|
||||
#
|
||||
#ServerName www.example.com:80
|
||||
ServerName <%= homename %>
|
||||
ServerName <%= @homename %>
|
||||
|
||||
#
|
||||
# UseCanonicalName: Determines how Apache constructs self-referencing
|
||||
|
@ -283,7 +283,7 @@ UseCanonicalName Off
|
|||
# documents. By default, all requests are taken from this directory, but
|
||||
# symbolic links and aliases may be used to point to other locations.
|
||||
#
|
||||
DocumentRoot "/srv/www/http/<%= homename %>"
|
||||
DocumentRoot "/srv/www/http/<%= @homename %>"
|
||||
|
||||
#
|
||||
# Each directory to which Apache has access can be configured with respect
|
||||
|
@ -476,7 +476,7 @@ HostnameLookups Off
|
|||
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||
# container, that host's errors will be logged there and not here.
|
||||
#
|
||||
ErrorLog /srv/www/log/http/<%= homename %>/error_log
|
||||
ErrorLog /srv/www/log/http/<%= @homename %>/error_log
|
||||
|
||||
#
|
||||
# LogLevel: Control the number of messages logged to the error_log.
|
||||
|
@ -518,7 +518,7 @@ LogFormat "%{User-agent}i" agent
|
|||
# For a single logfile with access, agent, and referer information
|
||||
# (Combined Logfile Format), use the following directive:
|
||||
#
|
||||
CustomLog /srv/www/log/http/<%= homename %>/access_log combined
|
||||
CustomLog /srv/www/log/http/<%= @homename %>/access_log combined
|
||||
|
||||
#
|
||||
# Optionally add a line containing the server version and virtual host
|
||||
|
|
|
@ -145,7 +145,7 @@ MaxRequestsPerChild 0
|
|||
# Example:
|
||||
# LoadModule foo_module modules/mod_foo.so
|
||||
#
|
||||
<% if operatingsystem == 'Fedora' and operatingsystemrelease.to_i > 17 -%>
|
||||
<% if @operatingsystem == 'Fedora' and @operatingsystemrelease.to_i > 17 -%>
|
||||
Include conf.modules.d/*.conf
|
||||
<% else -%>
|
||||
LoadModule auth_basic_module modules/mod_auth_basic.so
|
||||
|
@ -196,7 +196,7 @@ LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
|||
LoadModule cache_module modules/mod_cache.so
|
||||
LoadModule suexec_module modules/mod_suexec.so
|
||||
LoadModule disk_cache_module modules/mod_disk_cache.so
|
||||
<% if ['CentOS','RedHat'].index(operatingsystem) and operatingsystemrelease =~ /^[1-5]\./ -%>
|
||||
<% if ['CentOS','RedHat'].index(@operatingsystem) and @operatingsystemrelease =~ /^[1-5]\./ -%>
|
||||
LoadModule file_cache_module modules/mod_file_cache.so
|
||||
LoadModule mem_cache_module modules/mod_mem_cache.so
|
||||
<% end -%>
|
||||
|
@ -249,13 +249,13 @@ Group <%= scope.lookupvar('apache::sslserver::group') %>
|
|||
# virtual host being defined.
|
||||
#
|
||||
|
||||
<% if has_variable?("domain") -%>
|
||||
<% if @domain -%>
|
||||
#
|
||||
# ServerAdmin: Your address, where problems with the server should be
|
||||
# e-mailed. This address appears on some server-generated pages, such
|
||||
# as error documents. e.g. admin@your-domain.com
|
||||
#
|
||||
ServerAdmin adm@<%= domain %>
|
||||
ServerAdmin adm@<%= @domain %>
|
||||
<% end -%>
|
||||
|
||||
#
|
||||
|
@ -271,7 +271,7 @@ ServerAdmin adm@<%= domain %>
|
|||
# redirections work in a sensible way.
|
||||
#
|
||||
#ServerName www.example.com:80
|
||||
ServerName <%= homename %>
|
||||
ServerName <%= @homename %>
|
||||
|
||||
#
|
||||
# UseCanonicalName: Determines how Apache constructs self-referencing
|
||||
|
@ -287,7 +287,7 @@ UseCanonicalName Off
|
|||
# documents. By default, all requests are taken from this directory, but
|
||||
# symbolic links and aliases may be used to point to other locations.
|
||||
#
|
||||
DocumentRoot "/srv/www/https/<%= homename %>"
|
||||
DocumentRoot "/srv/www/https/<%= @homename %>"
|
||||
|
||||
#
|
||||
# Each directory to which Apache has access can be configured with respect
|
||||
|
@ -480,7 +480,7 @@ HostnameLookups Off
|
|||
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||
# container, that host's errors will be logged there and not here.
|
||||
#
|
||||
ErrorLog /srv/www/log/https/<%= homename %>/error_log
|
||||
ErrorLog /srv/www/log/https/<%= @homename %>/error_log
|
||||
|
||||
#
|
||||
# LogLevel: Control the number of messages logged to the error_log.
|
||||
|
@ -522,7 +522,7 @@ LogFormat "%{User-agent}i" agent
|
|||
# For a single logfile with access, agent, and referer information
|
||||
# (Combined Logfile Format), use the following directive:
|
||||
#
|
||||
CustomLog /srv/www/log/https/<%= homename %>/access_log combined
|
||||
CustomLog /srv/www/log/https/<%= @homename %>/access_log combined
|
||||
|
||||
#
|
||||
# Optionally add a line containing the server version and virtual host
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% if has_variable?("apache_proxy_allow") -%>
|
||||
<% if @apache_proxy_allow -%>
|
||||
ProxyRequests On
|
||||
ProxyVia On
|
||||
|
||||
<Proxy *>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from <%= apache_proxy_allow %>
|
||||
Allow from <%= @apache_proxy_allow %>
|
||||
</Proxy>
|
||||
<% else -%>
|
||||
ProxyRequests Off
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName <%= site_fqdn %>
|
||||
<% if aliases != "" -%>
|
||||
ServerAlias <%= aliases %>
|
||||
ServerName <%= @site_fqdn %>
|
||||
<% if @aliases != "" -%>
|
||||
ServerAlias <%= @aliases %>
|
||||
<% end -%>
|
||||
ErrorLog /srv/www/log/http/<%= site_fqdn %>/error_log
|
||||
CustomLog /srv/www/log/http/<%= site_fqdn %>/access_log combined
|
||||
DocumentRoot /srv/www/http/<%= site_fqdn %>
|
||||
Include <%= site_confdir %>/*.conf
|
||||
ErrorLog /srv/www/log/http/<%= @site_fqdn %>/error_log
|
||||
CustomLog /srv/www/log/http/<%= @site_fqdn %>/access_log combined
|
||||
DocumentRoot /srv/www/http/<%= @site_fqdn %>
|
||||
Include <%= @site_confdir %>/*.conf
|
||||
</VirtualHost>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<VirtualHost <%= ipaddr %>:443>
|
||||
<VirtualHost <%= @ipaddr %>:443>
|
||||
|
||||
# General setup for the virtual host, inherited from global configuration
|
||||
DocumentRoot "/srv/www/https/<%= site_fqdn %>"
|
||||
ServerName <%= site_fqdn %>:443
|
||||
DocumentRoot "/srv/www/https/<%= @site_fqdn %>"
|
||||
ServerName <%= @site_fqdn %>:443
|
||||
|
||||
# Use separate log files for the SSL virtual host; note that LogLevel
|
||||
# is not inherited from httpd.conf.
|
||||
ErrorLog /srv/www/log/https/<%= site_fqdn %>/error_log
|
||||
CustomLog /srv/www/log/https/<%= site_fqdn %>/access_log combined
|
||||
ErrorLog /srv/www/log/https/<%= @site_fqdn %>/error_log
|
||||
CustomLog /srv/www/log/https/<%= @site_fqdn %>/access_log combined
|
||||
LogLevel warn
|
||||
|
||||
# SSL Engine Switch:
|
||||
|
@ -30,14 +30,14 @@ SSLCipherSuite RC4-SHA:HIGH:!ADH
|
|||
# the certificate is encrypted, then you will be prompted for a
|
||||
# pass phrase. Note that a kill -HUP will prompt again. A new
|
||||
# certificate can be generated using the genkey(1) command.
|
||||
SSLCertificateFile <%= @apache_ssldir %>/certs/<%= site_fqdn %>.crt
|
||||
SSLCertificateFile <%= @apache_ssldir %>/certs/<%= @site_fqdn %>.crt
|
||||
|
||||
# Server Private Key:
|
||||
# If the key is not combined with the certificate, use this
|
||||
# directive to point at the key file. Keep in mind that if
|
||||
# you've both a RSA and a DSA private key you can configure
|
||||
# both in parallel (to also allow the use of DSA ciphers, etc.)
|
||||
SSLCertificateKeyFile <%= @apache_ssldir %>/private/<%= site_fqdn %>.key
|
||||
SSLCertificateKeyFile <%= @apache_ssldir %>/private/<%= @site_fqdn %>.key
|
||||
|
||||
# Server Certificate Chain:
|
||||
# Point SSLCertificateChainFile at a file containing the
|
||||
|
@ -46,8 +46,8 @@ SSLCertificateKeyFile <%= @apache_ssldir %>/private/<%= site_fqdn %>.key
|
|||
# the referenced file can be the same as SSLCertificateFile
|
||||
# when the CA certificates are directly appended to the server
|
||||
# certificate for convinience.
|
||||
<% if ssl_chain != "" -%>
|
||||
SSLCertificateChainFile <%= @apache_ssldir %>/certs/<%= site_fqdn %>.chain.crt
|
||||
<% if @ssl_chain != "" -%>
|
||||
SSLCertificateChainFile <%= @apache_ssldir %>/certs/<%= @site_fqdn %>.chain.crt
|
||||
<% end -%>
|
||||
|
||||
# Certificate Authority (CA):
|
||||
|
@ -149,6 +149,6 @@ BrowserMatch "MSIE [2-5]" \
|
|||
#CustomLog logs/ssl_request_log \
|
||||
# "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
|
||||
|
||||
Include <%= site_confdir %>/*.conf
|
||||
Include <%= @site_confdir %>/*.conf
|
||||
|
||||
</VirtualHost>
|
||||
|
|
|
@ -3,7 +3,7 @@ LoadModule ssl_module modules/mod_ssl.so
|
|||
</IfModule>
|
||||
|
||||
Listen 443
|
||||
<% if ['Fedora','CentOS','RedHat'].index(operatingsystem) -%>
|
||||
<% if ['Fedora','CentOS','RedHat'].index(@operatingsystem) -%>
|
||||
##
|
||||
## SSL Global Context
|
||||
##
|
||||
|
@ -30,7 +30,7 @@ SSLPassPhraseDialog builtin
|
|||
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
|
||||
SSLSessionCacheTimeout 300
|
||||
|
||||
<% unless operatingsystem == 'Fedora' and operatingsystemrelease.to_i > 17 -%>
|
||||
<% unless @operatingsystem == 'Fedora' and @operatingsystemrelease.to_i > 17 -%>
|
||||
# Semaphore:
|
||||
# Configure the path to the mutual exclusion semaphore the
|
||||
# SSL engine uses internally for inter-process synchronization.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
# the log filename ends in '.gz' (ie: a gzip compressed file), it will
|
||||
# be decompressed on the fly as it is being read.
|
||||
|
||||
LogFile /srv/www/log/<%= name %>/access_log
|
||||
LogFile /srv/www/log/<%= @name %>/access_log
|
||||
|
||||
# LogType defines the log type being processed. Normally, the Webalizer
|
||||
# expects a CLF or Combined web server log as input. Using this option,
|
||||
|
@ -39,7 +39,7 @@ LogFile /srv/www/log/<%= name %>/access_log
|
|||
# should be a full path name, however relative ones might work as well.
|
||||
# If no output directory is specified, the current directory will be used.
|
||||
|
||||
OutputDir /srv/www/webalizer/html/<%= name %>
|
||||
OutputDir /srv/www/webalizer/html/<%= @name %>
|
||||
|
||||
# HistoryName allows you to specify the name of the history file produced
|
||||
# by the Webalizer. The history file keeps the data for up to 12 months
|
||||
|
@ -49,7 +49,7 @@ OutputDir /srv/www/webalizer/html/<%= name %>
|
|||
# it will be kept in the specified output directory. Otherwise, the path
|
||||
# is relative to the output directory, unless absolute (leading /).
|
||||
|
||||
HistoryName /srv/www/webalizer/history/<%= name %>/webalizer.hist
|
||||
HistoryName /srv/www/webalizer/history/<%= @name %>/webalizer.hist
|
||||
|
||||
# Incremental processing allows multiple partial log files to be used
|
||||
# instead of one huge one. Useful for large sites that have to rotate
|
||||
|
@ -73,7 +73,7 @@ Incremental yes
|
|||
# kept in the normal output directory. If you don't specify "Incremental"
|
||||
# as 'yes' then this option has no meaning.
|
||||
|
||||
IncrementalName /srv/www/webalizer/history/<%= name %>/webalizer.current
|
||||
IncrementalName /srv/www/webalizer/history/<%= @name %>/webalizer.current
|
||||
|
||||
# ReportTitle is the text to display as the title. The hostname
|
||||
# (unless blank) is appended to the end of this string (seperated with
|
||||
|
@ -91,7 +91,7 @@ IncrementalName /srv/www/webalizer/history/<%= name %>/webalizer.current
|
|||
# try to get the hostname via a uname system call. If that fails,
|
||||
# it will default to "localhost".
|
||||
|
||||
HostName <%= site_fqdn %>
|
||||
HostName <%= @site_fqdn %>
|
||||
|
||||
# HTMLExtension allows you to specify the filename extension to use
|
||||
# for generated HTML pages. Normally, this defaults to "html", but
|
||||
|
@ -119,7 +119,7 @@ PageType shtml
|
|||
# Default is 'no'. This only changes the behaviour of the 'Top
|
||||
# URL's' table.
|
||||
|
||||
UseHTTPS <% if site_proto == 'https' %>yes<% else %>no<% end %>
|
||||
UseHTTPS <% if @site_proto == 'https' %>yes<% else %>no<% end %>
|
||||
|
||||
# DNSCache specifies the DNS cache filename to use for reverse DNS lookups.
|
||||
# This file must be specified if you wish to perform name lookups on any IP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue