direi i files che dal log dice di non trovare cercandoli in www/docroot
EDIT : ecco il mio nginx.conf
user nobody nogroup;
# DO NOT EVER change the number of worker processes!
worker_processes 1;
error_log syslog:server=unix:/dev/log,facility=daemon,nohostname warn;
events {
worker_connections 256;
}
http {
access_log off;
server_tokens off;
gzip on;
gzip_comp_level 5;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types application/javascript
application/rss+xml
application/vnd.ms-fontobject
application/x-font
application/x-font-opentype
application/x-font-otf
application/x-font-truetype
application/x-font-ttf
application/x-javascript
application/xhtml+xml
application/xml
font/opentype
font/otf
font/ttf
image/svg+xml
image/x-icon
image/webp
image/png
text/css
text/html
text/javascript
text/plain
text/xml;
include mime.types;
lua_package_path ';;${prefix}lib/lua/?.lua;/www/lua/?.lua';
lua_package_cpath '${prefix}lib/lua/?.so';
keepalive_timeout 65;
add_header X-Frame-Options SAMEORIGIN;
add_header Vary Accept-Encoding;
init_by_lua '
local state_dir = "/var/run/assistance"
local cmd = string.format("if [ ! -d %s ]; then mkdir %s && chown nobody %s; fi;rm -f %s/*", state_dir, state_dir, state_dir, state_dir)
os.execute(cmd)
';
init_worker_by_lua '
local sessioncontrol = require("web.sessioncontrol")
sessioncontrol.setManagerForPort("default", "80")
sessioncontrol.setManagerForPort("default", "443")
sessioncontrol.setManagerForPort("assistance", "443")
';
server {
# ipv4
listen 80;
listen 443 ssl;
# ipv6
listen [::]:80;
listen [::]:443 ssl;
ssl_certificate /etc/nginx/server.crt;
ssl_certificate_key /etc/nginx/server.key;
# based on https://wiki.mozilla.org/Security/Server_Side_TLS
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:!DSS;
ssl_prefer_server_ciphers on;
ssl_session_tickets off;
server_name localhost;
root /www/docroot;
client_body_buffer_size 64k;
# platform/custo specific values
include ui_server.conf;
location = / {
add_header Content-Type "text/html; charset=UTF-8";
add_header Content-Security-Policy "default-src 'self';script-src 'self' 'unsafe-eval' 'unsafe-inline';style-src 'self' 'unsafe-inline'";
index gateway.lp;
}
location ^~ /css/ {
add_header Content-Type "text/css; charset=UTF-8";
expires 365d;
}
location ^~ /img/ {
add_header Content-Type "image/webp; charset=UTF-8";
add_header Content-Type "image/png; charset=UTF-8";
expires 365d;
}
location ^~ /fonts/ {
add_header Content-Type "application/font-woff2; charset=UTF-8";
expires 365d;
}
location ^~ /js/ {
add_header Content-Type "application/javascript; charset=UTF-8";
expires 365d;
}
location /aria {
index index.html;
alias /www/docroot/aria;
}
location /transmission {
proxy_pass http://127.0.0.1:9091;
proxy_pass_header X-Transmission-Session-Id;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /transmission/web/style/ {
alias /usr/share/transmission/web/style/;
}
location /transmission/web/javascript/ {
alias /usr/share/transmission/web/javascript/;
}
location /transmission/web/images/ {
alias /usr/share/transmission/web/images/;
}
location /luci {
proxy_pass http://127.0.0.1:9080;
}
location ~* .(jpg|jpeg|png|gif|ico|css|js|webp)$ {
expires 365d;
}
location ^~ / {
access_by_lua '
require("web.assistance").enable()
local mgr = require("web.sessioncontrol").getmgr()
if ngx.req.get_uri_args().auto_update == "true" then
mgr:checkrequest(true)
else
mgr:checkrequest()
end
mgr:handleAuth()
';
content_by_lua '
require("cards").setpath("/www/cards")
require("web.lp").setpath("/www/cards/")
require("web.web").process()
';
}
location = /api {
# We read the complete request in memory so to prevent DoS attack we
# must limit the allowed request size.
# For simplicity this should be the same as client_body_buffer_size so the
# body does not get spilled into a temp file.
client_body_buffer_size 64k;
client_max_body_size 64k;
content_by_lua '
local role = require("webservice.accesscontrol_token").authenticate()
require("webservice.api").process(role)
';
}
# additional/custom configuration
include main_*.conf;
}
server {
listen 127.0.0.1:55555;
server_name 127.0.0.1;
root /www;
location = /ra {
access_by_lua '
require("web.assistance").enable()
';
content_by_lua '
local assistance = require("web.assistance")
local getargs = ngx.req.get_uri_args()
for k, v in pairs(getargs) do
local assistant = assistance.getAssistant(k)
local enable, mode, pwdcfg, pwd = string.match(string.untaint(v), "(.*)_(.*)_(.*)_(.*)")
if pwdcfg == "random" then
pwd=nil
elseif pwdcfg == "keep" then
pwd=false
elseif pwdcfg == "srpuci" then
local dm = require("datamodel")
local srp_pair, user_map = {}, {}
local cfg=dm.get("uci.web.user.")
if cfg then
for _, entry in ipairs(cfg) do
local ra_name = string.match(string.untaint(entry.path),"%.@([^.]*)%.")
if ra_name then
if entry.param == "name" then
user_map[entry.value] = ra_name
end
if (entry.param == "srp_salt" or entry.param == "srp_verifier") and entry.value ~= "" then
srp_pair[ra_name] = srp_pair[ra_name] or {}
srp_pair[ra_name][string.match(entry.param, "srp_(.*)")] = string.untaint(entry.value)
end
end
end
end
local result = dm.get("uci.web.assistance.@" .. k .. ".user")
if result then
local user = result[1].value
pwd = srp_pair[user_map[user]]
end
if pwd and (not pwd["salt"] or not pwd["verifier"]) then
pwd = nil
end
end
if enable == "on" then
assistant:enable(true, mode=="permanent", pwd)
elseif enable == "off" then
assistant:enable(false, mode=="permanent", pwd)
end
end
';
}
location = /reloadWebUsers {
content_by_lua '
require("web.sessioncontrol").reloadUsers()
';
}
location = /api/reload {
content_by_lua '
require("webservice.accesscontrol_token").reload_config()
';
}
}
server {
# ipv4
listen 8080 tproxy;
# ipv6
listen [::]:8080 tproxy;
#access_log /var/log/nginx/intercept.log;
access_by_lua '
require("web.intercept").process()
';
}
include server_*.conf;
}