forked from jD91mZM2/docker-compiler-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
26 lines (24 loc) · 836 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
http {
server {
listen 80;
location / {
root /var/www/;
try_files /index.html =404;
}
location /prefix/ {
# Nginx doesn't escape URIs for some reason when using the
# default strip thingy. This works around that by manually
# rewriting and using the URI.
# See https://stackoverflow.com/questions/28684300/nginx-pass-proxy-subdirectory-without-url-decoding/37584637#37584637
rewrite ^ $request_uri;
rewrite ^/prefix/(.*)$ /$1 break;
return 403; # only if it didn't match
proxy_pass http://localhost:10240$uri;
}
location /vs/ {
# This path isn't prefixed for whatever reason
proxy_pass http://localhost:10240;
}
}
}
events {}