summaryrefslogtreecommitdiffstats
path: root/installer/roles/image_build
diff options
context:
space:
mode:
authorsoftwarefactory-project-zuul[bot] <softwarefactory-project-zuul[bot]@users.noreply.github.com>2019-05-28 15:51:43 +0200
committerGitHub <noreply@github.com>2019-05-28 15:51:43 +0200
commit9c90694f12696e27df658273b36bbc6222569dee (patch)
tree55fad31fa3737257673000c46e105a7365d15fd0 /installer/roles/image_build
parentMerge pull request #3941 from elyezer/window-size-e2e (diff)
parentSet up HTTPS w/ proper port & HTTP redirect (diff)
downloadawx-9c90694f12696e27df658273b36bbc6222569dee.tar.xz
awx-9c90694f12696e27df658273b36bbc6222569dee.zip
Merge pull request #3604 from athenahealth/complete-ssl-support
Update SSL support for docker-compose install Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
Diffstat (limited to 'installer/roles/image_build')
-rw-r--r--installer/roles/image_build/templates/nginx.conf.j216
1 files changed, 13 insertions, 3 deletions
diff --git a/installer/roles/image_build/templates/nginx.conf.j2 b/installer/roles/image_build/templates/nginx.conf.j2
index b40d3b3f22..a0f23698cb 100644
--- a/installer/roles/image_build/templates/nginx.conf.j2
+++ b/installer/roles/image_build/templates/nginx.conf.j2
@@ -35,9 +35,19 @@ http {
server 127.0.0.1:8051;
}
+ {% if ssl_certificate is defined %}
+ server {
+ listen 8052 default_server;
+ server_name _;
+
+ # Redirect all HTTP links to the matching HTTPS page
+ return 301 https://$host$request_uri;
+ }
+ {%endif %}
+
server {
{% if ssl_certificate is defined %}
- listen 8052 ssl default_server;
+ listen 8053 ssl;
ssl_certificate /etc/nginx/awxweb.pem;
ssl_certificate_key /etc/nginx/awxweb.pem;
@@ -54,14 +64,14 @@ http {
# Protect against click-jacking https://www.owasp.org/index.php/Testing_for_Clickjacking_(OTG-CLIENT-009)
add_header X-Frame-Options "DENY";
-
+
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
-
+
location /static/ {
alias /var/lib/awx/public/static/;
}