-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdefault.conf
29 lines (25 loc) · 1.02 KB
/
default.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
27
28
29
# This is a modified version of the /etc/nginx/conf.d/default.conf
# from the nginx image.
#
# We just forward URLs to other hosts so that they can share a single hostname/port combo.
#
# Of course, if you put this into production, I highly recommend getting TLS certificates
# to enable HTTPS!
server {
listen 80;
server_name localhost;
# API gets exclusive use of this path:
location /diskuto/ {
proxy_pass http://api:8080/diskuto/;
}
# Web server gets all other paths:
location / {
proxy_pass http://web:8080/;
# Let the server know its visible host/protocol for constructing canonical URLs:
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto http; # https when you get your cert! :)
}
# TODO: Some shortcuts for web server efficiency.
# diskuto-web is currently lazy and just redirects icon.png and files/* requests
# over to the API. If we route those paths directly to api here, we can skip that step.
}