From eea868b891a624b1e055e37cdad1229c6babccd7 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Tue, 10 Dec 2019 20:52:10 +0000 Subject: [PATCH] include a php clause in nginx conf --- .../templates/osm-vector-maps-nginx.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/roles/osm-vector-maps/templates/osm-vector-maps-nginx.conf b/roles/osm-vector-maps/templates/osm-vector-maps-nginx.conf index 97cfc2535..8b5813b63 100644 --- a/roles/osm-vector-maps/templates/osm-vector-maps-nginx.conf +++ b/roles/osm-vector-maps/templates/osm-vector-maps-nginx.conf @@ -1,7 +1,19 @@ # For downloadable regional vector tilesets location /maps { - alias /library/www/osm-vector-maps; + rewrite ^/maps/(.*)$ /osm-vector-maps/$1; } location /osm-vector-maps { alias /library/www/osm-vector-maps; } +location ~ ^/osm-vector-maps/(.*)\.php(.*)$ { + alias /library/www/osm-vector-maps/$1.php$2; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + fastcgi_pass php; + include fastcgi_params; + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + fastcgi_param PATH_INFO $2; +}