mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
nginx: backport master changes to 19.07
Currently luci is broken in 19.07. Changes done to fix this problem didn't merge in the 19.07 release. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
@@ -25,4 +25,17 @@ if [ -f "/etc/nginx/luci_nginx.conf" ] && [ -f "/etc/nginx/nginx.conf" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if nginx -V 2>&1 | grep -q ubus; then
|
||||
if [ -z "$(cat /etc/nginx/luci_uwsgi.conf | grep ubus)" ]; then
|
||||
cat <<EOT >> /etc/nginx/luci_uwsgi.conf
|
||||
|
||||
location /ubus {
|
||||
ubus_interpreter;
|
||||
ubus_socket_path /var/run/ubus.sock;
|
||||
ubus_parallel_req 2;
|
||||
}
|
||||
EOT
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
user nobody nogroup;
|
||||
user root;
|
||||
worker_processes 1;
|
||||
|
||||
#error_log logs/error.log;
|
||||
@@ -20,7 +20,7 @@ http {
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 0;
|
||||
|
||||
|
||||
client_body_buffer_size 10K;
|
||||
client_header_buffer_size 1k;
|
||||
client_max_body_size 1G;
|
||||
@@ -31,14 +31,15 @@ http {
|
||||
gzip_vary on;
|
||||
gzip_comp_level 1;
|
||||
gzip_proxied any;
|
||||
|
||||
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
|
||||
|
||||
root /www;
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name localhost;
|
||||
|
||||
|
||||
location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
|
||||
expires 365d;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ http {
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 0;
|
||||
|
||||
|
||||
client_body_buffer_size 10K;
|
||||
client_header_buffer_size 1k;
|
||||
client_max_body_size 1G;
|
||||
@@ -31,9 +31,10 @@ http {
|
||||
gzip_vary on;
|
||||
gzip_comp_level 1;
|
||||
gzip_proxied any;
|
||||
|
||||
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
|
||||
|
||||
root /www;
|
||||
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
@@ -45,7 +46,7 @@ http {
|
||||
listen 443 ssl default_server;
|
||||
listen [::]:443 ssl default_server;
|
||||
server_name localhost;
|
||||
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:DHE+AESGCM:DHE:!RSA!aNULL:!eNULL:!LOW:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!CAMELLIA:!SEED";
|
||||
@@ -53,7 +54,7 @@ http {
|
||||
|
||||
ssl_certificate /etc/nginx/nginx.cer;
|
||||
ssl_certificate_key /etc/nginx/nginx.key;
|
||||
|
||||
|
||||
location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
|
||||
expires 365d;
|
||||
}
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
location /cgi-bin/luci {
|
||||
index index.html;
|
||||
uwsgi_param QUERY_STRING $query_string;
|
||||
uwsgi_param REQUEST_METHOD $request_method;
|
||||
uwsgi_param CONTENT_TYPE $content_type;
|
||||
uwsgi_param CONTENT_LENGTH $content_length if_not_empty;
|
||||
uwsgi_param REQUEST_URI $request_uri;
|
||||
uwsgi_param PATH_INFO $document_uri;
|
||||
uwsgi_param SERVER_PROTOCOL $server_protocol;
|
||||
uwsgi_param REMOTE_ADDR $remote_addr;
|
||||
uwsgi_param REMOTE_PORT $remote_port;
|
||||
uwsgi_param SERVER_ADDR $server_addr;
|
||||
uwsgi_param SERVER_PORT $server_port;
|
||||
uwsgi_param SERVER_NAME $server_name;
|
||||
uwsgi_modifier1 9;
|
||||
uwsgi_pass unix:////var/run/uwsgi.sock;
|
||||
index index.html;
|
||||
include uwsgi_params;
|
||||
uwsgi_param SERVER_ADDR $server_addr;
|
||||
uwsgi_modifier1 9;
|
||||
uwsgi_pass unix:////var/run/luci-webui.socket;
|
||||
}
|
||||
location ~ /cgi-bin/cgi-(backup|download|upload|exec) {
|
||||
include uwsgi_params;
|
||||
uwsgi_param SERVER_ADDR $server_addr;
|
||||
uwsgi_modifier1 9;
|
||||
uwsgi_pass unix:////var/run/luci-cgi_io.socket;
|
||||
}
|
||||
|
||||
location /luci-static {
|
||||
|
||||
Reference in New Issue
Block a user