-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.conf.localhost
More file actions
30 lines (30 loc) · 850 Bytes
/
default.conf.localhost
File metadata and controls
30 lines (30 loc) · 850 Bytes
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
30
# Default server configuration
server {
listen 80 default_server;
root /app;
# Routes without file extension e.g. /user/1
location / {
try_files $uri /index.html;
}
# 404 if a file is requested (so the main app isn't served)
location ~ ^.+\..+$ {
try_files $uri =404;
}
# OPTIONAL: For an API server you want to proxy
location /api {
proxy_pass http://localhost:8000;
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;
}
location /account {
proxy_pass http://localhost:8000;
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;
}
}