]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: point logs for HTTP server to custom location
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 24 Apr 2020 22:13:42 +0000 (00:13 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 24 Apr 2020 22:13:42 +0000 (00:13 +0200)
cookbooks/nominatim/templates/default/nginx.erb

index ef0a2fdc8a215a0ea1f23df0e219c813116677f4..51b40776e25583e27920081e6794418283a23740 100644 (file)
@@ -56,10 +56,13 @@ limit_req_zone $limit_tarpit zone=tarpit:10m rate=1r/s;
 limit_req_zone $binary_remote_addr zone=blocked:10m rate=20r/m;
 
 server {
-  listen 80 default_server;
-  listen [::]:80 default_server;
+    listen 80 default_server;
+    listen [::]:80 default_server;
 
-  location /nginx_status {
+    access_log <%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-access.log combined;
+    error_log <%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-error.log;
+
+    location /nginx_status {
         stub_status on;
         access_log   off;
         allow 127.0.0.1;
@@ -67,11 +70,11 @@ server {
         deny all;
     }
 
-   rewrite ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 permanent;
+     rewrite ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 permanent;
 
-   location / {
-       return 301 https://$host$request_uri;
-   }
+     location / {
+         return 301 https://$host$request_uri;
+     }
 }
 
 server {