forked from foglamp/foglamp-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
39 lines (31 loc) · 908 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
27
28
29
30
31
32
33
34
35
36
37
38
39
events {
worker_connections 256;
}
http {
# ubuntu
# include /etc/nginx/mime.types;
# mac
include /usr/local/etc/nginx/mime.types;
#windows : TODO
server {
root dist/; # necessary to avoid nginx injecting root into try_files directives
listen 8080;
server_name localhost;
server_name 127.0.0.1;
sendfile off;
location / {
try_files $uri$args $uri$args/ /index.html;
}
# serve static content
location /static/ {
# path for static files
root .;
}
# pass requests for dynamic content to aiohttp server
location ^~ /foglamp/ {
# TODO: CORS configuration based on http://enable-cors.org/server_nginx.html
# allow dynamic host proxy to service api
proxy_pass http://0.0.0.0:8081/foglamp;
}
}
}