Anyway, are there any size limits for error logs?
QuoteAnyway, are there any size limits for error logs? you can edit template and add size limit (in kilobytes)but I really think it's not about the newsyslog settings. you need to look at the log and figure out what is the reason for so many errors.
root@OPNsense:/usr/local/etc/nginx # cat /usr/local/opnsense/service/templates/OPNsense/Nginx/newsyslog.conf# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]{% if helpers.exists('OPNsense.Nginx') %}/var/log/nginx/*access.log www:www 640 14 10000 @T00 GZB /var/run/nginx.pid 30/var/log/nginx/*error.log www:www 640 14 10000 @T00 GZB /var/run/nginx.pid 30{% endif %}
Does it look sensible and correct (10000k)?
my main task was not to loose connection :-)
Will "port_in_redirect off" in server block be permanent a solution?
gets rewritten after typing in logon credentials to https://server.domain.com/login
look at backend logs for responses after user authentication. i think that authentication form in /login page redirects user to absolute url after authentication. if so you can try proxy_redirect directive in location block (http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect) (https://stackoverflow.com/questions/20254456/intercepting-backend-301-302-redirects-proxy-pass-and-rewriting-to-another-loc)
Does $http_host contain domain and port?
no way to change header in location response
why? it should work imho. if after users auth backend server send 307 with location: https://server.domain.com/welcome.html, proxy_redirect will replace loaction with https://server.domain.com:4443/welcome.html for you. then client hit the 4443 port
Nginx listens on 443, firewall opens WAN port 4443 and forwards traffic to Nginx port 443.
proxy_redirect https://server.domain.com/ https://server.domain.com:4443/;
can I somehow configure such redirect in webgui or I must go for hook file?
ok. it remains to understand which port the backend is listening to. and is there a url changing between user request and request from nginx to backend.if the problem is only in the absence of a port in the redirect location then you can try Code: [Select]proxy_redirect https://server.domain.com/ https://server.domain.com:4443/;
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)! < HTTP/2 302 < server: nginx < date: Wed, 23 Sep 2020 23:59:15 GMT < content-type: text/html; charset=UTF-8 < content-length: 0 < cache-control: no-store, no-cache, must-revalidate < content-security-policy: default-src 'self'; script-src 'self' style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self'; < location: https://server.domain.com/login
client makes request on port 4443 which in turn is transparent for Nginx since firewall forwards such request to Nginx
proxy_redirect https://server.domain.com/ https://$http_host/;
is it possible to use WAF whitelist? I mean If I set it to allow matching requests, all other requests will be rejected?