summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <michael@ansibleworks.com>2013-09-07 20:27:43 +0200
committerMichael DeHaan <michael@ansibleworks.com>2013-09-07 20:27:43 +0200
commitd90858fe589f96d4459a5e6d5cba2f32e926ab9f (patch)
tree556be1e3c059a726b652bafd6114f814fe695302
parentAC-419 resolved Ask vs. Clear buttons accidentally allowing user to wipe out ... (diff)
downloadawx-d90858fe589f96d4459a5e6d5cba2f32e926ab9f.tar.xz
awx-d90858fe589f96d4459a5e6d5cba2f32e926ab9f.zip
Add HTTPs and redirect http to HTTPs. Self signed.
-rw-r--r--config/awx-plain.conf26
-rw-r--r--config/awx.conf8
2 files changed, 32 insertions, 2 deletions
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 @@
+<VirtualHost _default_:80>
+ 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/
+
+ <Directory /var/lib/awx/>
+ <Files wsgi.py>
+ Order deny,allow
+ Allow from all
+ </Files>
+ </Directory>
+
+ <Directory /var/lib/awx/public/>
+ Order deny,allow
+ Allow from all
+ </Directory>
+
+</VirtualHost>
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
-<VirtualHost _default_:80>
+<VirtualHost _default_:443>
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