From d90858fe589f96d4459a5e6d5cba2f32e926ab9f Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 7 Sep 2013 14:27:43 -0400 Subject: Add HTTPs and redirect http to HTTPs. Self signed. --- config/awx-plain.conf | 26 ++++++++++++++++++++++++++ config/awx.conf | 8 ++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 config/awx-plain.conf (limited to 'config') diff --git a/config/awx-plain.conf b/config/awx-plain.conf new file mode 100644 index 0000000000..a5b4200022 --- /dev/null +++ b/config/awx-plain.conf @@ -0,0 +1,26 @@ + + ServerName localhost + ServerAlias localhost + ServerAlias 127.0.0.1 + DocumentRoot /var/lib/awx/public + + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} + + Alias /favicon.ico /var/lib/awx/public/static/favicon.ico + Alias /static/ /var/lib/awx/public/static/ + + + + Order deny,allow + Allow from all + + + + + Order deny,allow + Allow from all + + + diff --git a/config/awx.conf b/config/awx.conf index 14909d8fc4..63dba5295c 100644 --- a/config/awx.conf +++ b/config/awx.conf @@ -1,11 +1,15 @@ -NameVirtualHost *:80 +NameVirtualHost *:443 WSGISocketPrefix /var/run/wsgi +LoadModule ssl_module modules/mod_ssl.so - + ServerName localhost ServerAlias localhost ServerAlias 127.0.0.1 DocumentRoot /var/lib/awx/public + SSLEngine on + SSLCertificateFile /etc/awx/awx.cert + SSLCertificateKeyFile /etc/awx/awx.key WSGIScriptAlias / /var/lib/awx/wsgi.py WSGIPassAuthorization On -- cgit v1.2.3