summaryrefslogtreecommitdiff
path: root/roles/install_nginx/files
diff options
context:
space:
mode:
authorNiklas Yann Wettengel <niyawe@niyawe.de>2021-07-28 18:53:23 +0200
committerNiklas Yann Wettengel <niyawe@niyawe.de>2021-07-28 18:53:23 +0200
commit140a04a8b58fdcef4f80398bc2f762d648a3a035 (patch)
tree4ae2db2340e78fc33fbe8ceb7796e0d60e168326 /roles/install_nginx/files
parent9ec1670a262597356c24bff27d473eccceb45b61 (diff)
run webserver for connectivity check
Diffstat (limited to 'roles/install_nginx/files')
-rw-r--r--roles/install_nginx/files/nginx.conf32
1 files changed, 32 insertions, 0 deletions
diff --git a/roles/install_nginx/files/nginx.conf b/roles/install_nginx/files/nginx.conf
index 12e9948..b37c7b0 100644
--- a/roles/install_nginx/files/nginx.conf
+++ b/roles/install_nginx/files/nginx.conf
@@ -21,6 +21,38 @@ http {
charset UTF-8;
+ server {
+ listen 80 default_server;
+ listen [::]:80 default_server ipv6only=on;
+
+ index index.html index.htm;
+ root /srv/http;
+
+ location / {
+ try_files $uri $uri/ =404;
+ autoindex on;
+ }
+
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root /usr/share/nginx/html;
+ }
+
+ location /nginx_status {
+ stub_status on;
+ access_log off;
+ allow 127.0.0.1;
+ allow ::1;
+ deny all;
+ }
+
+ location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf|svg)$ {
+ expires 30d;
+ # Optional: Don't log access to assets
+ access_log off;
+ }
+ }
+
# Virtual Host Config
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;