To use these files set uhttpd to listen on 127.0.0.1:1000 install nginx-ssl from opkg replace the init.d script with the one from here add in the conf file restart nginx/reboot nginx will proxy to luci and uhttpd will handle cgi in cgi-bin for nginx
66 lines
1.3 KiB
Nginx Configuration File
66 lines
1.3 KiB
Nginx Configuration File
user root;
|
|
worker_processes auto;
|
|
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
sendfile on;
|
|
keepalive_timeout 5;
|
|
|
|
client_body_buffer_size 10K;
|
|
client_header_buffer_size 1k;
|
|
client_max_body_size 1G;
|
|
large_client_header_buffers 2 2k;
|
|
|
|
disable_symlinks off;
|
|
root /www;
|
|
|
|
access_log off;
|
|
|
|
index index.html;
|
|
|
|
# Main Server Block
|
|
server {
|
|
listen 80 default_server;
|
|
listen 443 ssl default_server;
|
|
root /www;
|
|
|
|
# SSL Configuration
|
|
ssl_certificate /etc/nginx/conf.d/_lan.crt;
|
|
ssl_certificate_key /etc/nginx/conf.d/_lan.key;
|
|
|
|
# Index File
|
|
index index.html;
|
|
|
|
# Serve static files from /www
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# Serve LuCI uHTTPd content
|
|
location /cgi-bin/ {
|
|
disable_symlinks off; # Allow symbolic links to be followed
|
|
proxy_pass http://127.0.0.1:1000;
|
|
}
|
|
|
|
location /ubus/ {
|
|
disable_symlinks off; # Allow symbolic links to be followed
|
|
proxy_pass http://127.0.0.1:1000;
|
|
}
|
|
|
|
location /luci-static/ {
|
|
disable_symlinks off; # Allow symbolic links to be followed
|
|
proxy_pass http://127.0.0.1:1000;
|
|
}
|
|
}
|
|
|
|
|
|
}
|