44 lines
898 B
Nginx Configuration File
44 lines
898 B
Nginx Configuration File
# vim: set sw=4 ts=4 sts=4 et :
|
|
|
|
user www-data;
|
|
worker_processes auto;
|
|
pid /run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 768;
|
|
}
|
|
|
|
http {
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
types_hash_max_size 2048;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
access_log /dev/stderr;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
gzip on;
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
server_name _;
|
|
|
|
root /usr/local/hudctrl/ui;
|
|
index index.html;
|
|
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:8000/;
|
|
|
|
real_ip_header X-Forwarded-For;
|
|
set_real_ip_from 0.0.0.0/0;
|
|
set_real_ip_from ::/0;
|
|
real_ip_recursive on;
|
|
proxy_set_header Host $proxy_host;
|
|
proxy_set_header X-Forwarded-For $realip_remote_addr;
|
|
}
|
|
}
|
|
}
|