diff options
| author | Kumar Damani <me@kumardamani.net> | 2022-09-07 20:40:17 +0000 |
|---|---|---|
| committer | Kumar Damani <me@kumardamani.net> | 2022-09-07 20:40:17 +0000 |
| commit | bbe10895d9df8dd7899bbd65575d5bf12e57f8c8 (patch) | |
| tree | 244d2f1ad38320863fb60f695c88c97799be1171 /roles/nginx_docker/templates/http.nginx.conf.j2 | |
| parent | 4d34de2f5e757bfeae5738547aabb61d3d28a2f8 (diff) | |
| parent | c85806e3289b5e207d51d382f8dc75edad04404d (diff) | |
Merge branch 'alpine' into 'master'
switched to alpine initial commit
See merge request kdam0/vps!2
Diffstat (limited to 'roles/nginx_docker/templates/http.nginx.conf.j2')
| -rw-r--r-- | roles/nginx_docker/templates/http.nginx.conf.j2 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/nginx_docker/templates/http.nginx.conf.j2 b/roles/nginx_docker/templates/http.nginx.conf.j2 new file mode 100644 index 0000000..2d4c61b --- /dev/null +++ b/roles/nginx_docker/templates/http.nginx.conf.j2 @@ -0,0 +1,24 @@ +server { + {% if item == "default" %} + listen 80 default_server; + server_name _; + return 301 https://$host$request_uri; + {% else %} + listen 443 ssl; + root /var/www/{{ item }}/html; + server_name {{ item }} www.{{ item }}; + ssl_certificate /etc/letsencrypt/live/{{ item }}/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/{{ item }}/privkey.pem; + ssl_protocols TLSv1.1 TLSv1.2; + ssl_ciphers HIGH:!aNULL:!MD5; + index index.html index.htm index.nginx-debian.html; + + location ~ /.well-known { + allow all; + } + + location / { + try_files $uri $uri/ =404; + } + {% endif %} +} |
