Permalink
Fetching contributors…
Cannot retrieve contributors at this time
109 lines (82 sloc) 2.2 KB
server {
listen 80;
server_name {{osm_fqdn}};
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
client_max_body_size 100M;
{{#auth}}
auth_basic "POSM";
auth_basic_user_file htpasswd;
{{/auth}}
location ~ /\. {
# do not serve dot files ever
return 404;
}
# proxied locations
location ~ ^/api/0.6/map$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
location ~ ^/api/0.6/(node|way|relation|changeset)/[0-9]+$ {
include /etc/nginx/fastcgi_params;
if ($request_method = GET) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
if ($request_method = HEAD) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
}
location ~ ^/api/0.6/(node|way|relation)/[0-9]+/history$ {
include /etc/nginx/fastcgi_params;
if ($request_method = GET) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
if ($request_method = HEAD) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
}
location ~ ^/api/0.6/(way|relation)/[0-9]+/full$ {
include /etc/nginx/fastcgi_params;
if ($request_method = GET) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
if ($request_method = HEAD) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
}
location ~ ^/api/0.6/(nodes|ways|relations)$ {
include /etc/nginx/fastcgi_params;
if ($request_method = GET) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
if ($request_method = HEAD) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
}
location ~ ^/api/0.6/changeset/[0-9]+/download$ {
include /etc/nginx/fastcgi_params;
if ($request_method = GET) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
if ($request_method = HEAD) {
fastcgi_pass 127.0.0.1:{{cgimap_port}};
}
}
location / {
proxy_pass http://127.0.0.1:{{osm_web_port}};
proxy_read_timeout 600s;
}
# static files for OSM
# assets
location /assets/ {
alias /opt/osm/osm-web/public/assets/;
}
location /iD/ {
alias /opt/osm/osm-web/vendor/assets/iD/iD/;
}
}
# vim: set sts=2 sw=2 et si nu: