mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-03 04:23:56 +08:00
update 2026-05-10 09:48:30
This commit is contained in:
1 parent
95ac96413e
commit
0b362674f1
6244 files changed
+2992248
No files matched your search
@@ -0,0 +1,75 @@
|
||||
worker_processes auto;
|
||||
|
||||
user root;
|
||||
|
||||
include module.d/*.module;
|
||||
|
||||
events {}
|
||||
|
||||
http {
|
||||
access_log off;
|
||||
log_format openwrt
|
||||
'$request_method $scheme://$host$request_uri => $status'
|
||||
' (${body_bytes_sent}B in ${request_time}s) <- $http_referer';
|
||||
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
|
||||
client_max_body_size 256M;
|
||||
large_client_header_buffers 2 1k;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
|
||||
root /www;
|
||||
|
||||
map $request_method:$query_string $login_request {
|
||||
default 0;
|
||||
~^POST:istorenextlogin=1$ 1;
|
||||
~^GET:istorenextlogin=1$ 2;
|
||||
}
|
||||
|
||||
server { #see uci show 'nginx._redirect2ssl'
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _redirect2ssl;
|
||||
include restrict_locally;
|
||||
|
||||
if ($login_request = 2) {
|
||||
return 302 $uri;
|
||||
}
|
||||
|
||||
proxy_intercept_errors on;
|
||||
uwsgi_intercept_errors on;
|
||||
|
||||
error_page 403 /cgi-bin/luci/istorenext-login;
|
||||
|
||||
location ~ ^/cgi-bin/luci/istorenext(/|$) {
|
||||
include uwsgi_params;
|
||||
|
||||
uwsgi_param SERVER_ADDR $server_addr;
|
||||
uwsgi_modifier1 9;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
if ($login_request = 0) {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
}
|
||||
if ($login_request = 1) {
|
||||
uwsgi_pass unix:////var/run/luci-webui.socket;
|
||||
}
|
||||
}
|
||||
|
||||
# configuration file /etc/nginx/conf.d/luci.locations:
|
||||
location /cgi-bin/luci {
|
||||
index index.html;
|
||||
include uwsgi_params;
|
||||
uwsgi_param SERVER_ADDR $server_addr;
|
||||
uwsgi_modifier1 9;
|
||||
uwsgi_pass unix:////var/run/luci-webui.socket;
|
||||
}
|
||||
access_log off; # logd openwrt;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user