From 0504e572eec2cc6e23b43c21d84efbe21b323faa Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 1 Feb 2011 12:44:50 +0000 Subject: - refactoring of apache config file, to ease future deployment --- modules/apache/templates/vhost_base.conf | 23 ++++++++++++++++ modules/apache/templates/vhost_catalyst_app.conf | 33 ++++------------------- modules/apache/templates/vhost_django_app.conf | 26 +----------------- modules/apache/templates/vhost_reverse_proxy.conf | 12 --------- modules/apache/templates/vhost_ssl_redirect.conf | 5 +--- 5 files changed, 30 insertions(+), 69 deletions(-) create mode 100644 modules/apache/templates/vhost_base.conf (limited to 'modules/apache/templates') diff --git a/modules/apache/templates/vhost_base.conf b/modules/apache/templates/vhost_base.conf new file mode 100644 index 00000000..266e7c29 --- /dev/null +++ b/modules/apache/templates/vhost_base.conf @@ -0,0 +1,23 @@ +<%- if use_ssl then + port = 443 +else + port = 80 +end +-%> + +> +<%- if use_ssl then -%> + SSLEngine on + SSLCertificateFile /etc/ssl/apache/<%= name %>.pem + SSLCertificateKeyFile /etc/ssl/apache/<%= name %>.pem +<%- end -%> + ServerName <%= real_vhost %> + DocumentRoot <%= location %> + + <%= content %> + + + Allow from all + + + diff --git a/modules/apache/templates/vhost_catalyst_app.conf b/modules/apache/templates/vhost_catalyst_app.conf index ca0aca68..eaa652d7 100644 --- a/modules/apache/templates/vhost_catalyst_app.conf +++ b/modules/apache/templates/vhost_catalyst_app.conf @@ -1,28 +1,5 @@ -<% if use_ssl then - port = 443 -else - port = 80 -end -%> - -> -<% if use_ssl then %> - SSLEngine on - SSLCertificateFile /etc/ssl/apache/<%= name %>.pem - SSLCertificateKeyFile /etc/ssl/apache/<%= name %>.pem -<% end %> - ServerName <%= name %> - # Serve static content directly - DocumentRoot /dev/null - -<% if location != '' then %> - Alias /static <%= location %>/root/static -<% end %> - Alias / <%= script %>/ - FastCgiServer <%= script %> -processes <%= process %> -idle-timeout 30 - - - Allow from all - - - +<%- if location != '' then -%> +Alias /static <%= location %>/root/static +<%- end -%> +Alias / <%= script %>/ +FastCgiServer <%= script %> -processes <%= process %> -idle-timeout 30 diff --git a/modules/apache/templates/vhost_django_app.conf b/modules/apache/templates/vhost_django_app.conf index 1cc12458..3310045e 100644 --- a/modules/apache/templates/vhost_django_app.conf +++ b/modules/apache/templates/vhost_django_app.conf @@ -1,25 +1 @@ -<% if use_ssl then - port = 443 -else - port = 80 -end -%> - -> -<% if use_ssl then %> - SSLEngine on - SSLCertificateFile /etc/ssl/apache/<%= name %>.pem - SSLCertificateKeyFile /etc/ssl/apache/<%= name %>.pem -<% end %> - - ServerName <%= name %> - # Serve static content directly - DocumentRoot /dev/null - - WSGIScriptAlias / /usr/local/lib/wsgi/<%= name %>.wsgi -#footer - - Allow from all - - - +WSGIScriptAlias / /usr/local/lib/wsgi/<%= name %>.wsgi diff --git a/modules/apache/templates/vhost_reverse_proxy.conf b/modules/apache/templates/vhost_reverse_proxy.conf index 24c2d12b..94866be5 100644 --- a/modules/apache/templates/vhost_reverse_proxy.conf +++ b/modules/apache/templates/vhost_reverse_proxy.conf @@ -1,10 +1,3 @@ - - ServerName <%= name %> - # Serve static content directly - DocumentRoot /dev/null - - - ProxyRequests Off @@ -15,8 +8,3 @@ ProxyPass / <%= url %> ProxyPassReverse / <%= url %> - - Allow from all - - - diff --git a/modules/apache/templates/vhost_ssl_redirect.conf b/modules/apache/templates/vhost_ssl_redirect.conf index bb22a2c8..d13c3093 100644 --- a/modules/apache/templates/vhost_ssl_redirect.conf +++ b/modules/apache/templates/vhost_ssl_redirect.conf @@ -1,4 +1 @@ - - ServerName <%= name %> - Redirect / https://<%= name %>/ - +Redirect / https://<%= name %>/ -- cgit v1.2.1