summaryrefslogtreecommitdiffstats
path: root/roles/nginx/files/default
diff options
context:
space:
mode:
authorGravatar Robin Obůrka <robin.oburka@nic.cz> 2016-10-18 14:58:26 +0200
committerGravatar Robin Obůrka <r.oburka@gmail.com> 2016-10-18 17:13:59 +0200
commit98081e863591d4f43447184fa69acc9f43d9ba63 (patch)
tree99e18487138431438902dd3246ce492e6af845da /roles/nginx/files/default
parentnginx: Fix conditional that deletes default config (diff)
downloadansible-roles-98081e863591d4f43447184fa69acc9f43d9ba63.tar.xz
nginx: Provide new mechanism for default page manipulation
Important changes: - The well-known path is moved to the separate snippet acme.conf - It is possible to disable default page - The autodetection mechanism for default page is provided
Diffstat (limited to 'roles/nginx/files/default')
-rw-r--r--roles/nginx/files/default2
1 files changed, 2 insertions, 0 deletions
diff --git a/roles/nginx/files/default b/roles/nginx/files/default
index 2b909ce..cfec4b2 100644
--- a/roles/nginx/files/default
+++ b/roles/nginx/files/default
@@ -2,6 +2,7 @@ server {
listen 80 default_server;
listen [::]:80 default_server;
+ include snippets/acme.conf;
include snippets/common.conf;
root /var/www/html;
@@ -12,5 +13,6 @@ server {
location / {
try_files $uri $uri/ =404;
+ return 301 https://$host$request_uri;
}
}