Skip to main content

Nginx Configuration Specification (WebUI External Open)

An nginx configuration directory must be created at the same level as config.ini:

/usr/local/<app_id>/nginx/<app_id>.conf

Content Template:

location /<app_id>/ {
proxy_pass http://127.0.0.1:<listen_port>/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

Example (weather application, port 16688):

location /weather/ {
proxy_pass http://127.0.0.1:16688/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}