QuoteWhere to find location.conf, somewhere within "/usr/local/etc/nginx"?/usr/local/opnsense/service/templates/OPNsense/Nginx/..Quote Still I'm not able to locate separate config file where I could enter missing headers and include in main config..in the end of location.conf right before last brace insert new hook.so before:Code: [Select]{% endif %}{# honeypot #}}after:Code: [Select]{% endif %}{# honeypot #} include {{ location['@uuid'] }}_post/*.conf;}go the GUI and apply nginx config (not reload, apply. so opnsense apply new location.conf)go to the /usr/local/etc/nginx/nginx.conf and be sure that at the end of location blocks there is a line like: include 248efebe-d2e2-401b-b93f-f4d9061bb18c_post/*.conf;if so, you can create folder like "248efebe-d2e2-401b-b93f-f4d9061bb18c_post" in /usr/local/etc/enginx/,place a file like "mylocationname.conf" with your directives and Apply nginx conf. imo that shoud work, (I checked and replaced User-agent header via the hook. works:Code: [Select]set $new_user_agent "${http_user_agent} via nginx";proxy_set_header User-Agent $new_user_agent;)at any step, something can go wrong. always make a backup
Where to find location.conf, somewhere within "/usr/local/etc/nginx"?
Still I'm not able to locate separate config file where I could enter missing headers and include in main config..
{% endif %}{# honeypot #}}
{% endif %}{# honeypot #} include {{ location['@uuid'] }}_post/*.conf;}
set $new_user_agent "${http_user_agent} via nginx";proxy_set_header User-Agent $new_user_agent;
proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection $proxy_connection; proxy_set_header X-Forwarded-Host $http_host/editors; server { listen 80; location / { proxy_pass_header Server; proxy_pass http://nextcloud/; } location /editors/ { proxy_pass http://onlyoffice/; }}
Are all of these changes persistent across upgrades?
Does it make practical difference whether they are in location section or above?
nope. upgrade of nginx plugin will overwrite location.conf. so it will need to be restored (but i hope that @fabian will include this hook in next version. and may be it will use same foldername syntax ))
so it might be the same for "location"?
an option to add headers manually, by typing them in?
don't think so. ideally, there should be no "free" fields in GUI configread "Safeguard user input" https://docs.opnsense.org/development/guidelines/basics.htmlso I highly doubt that such a request will not be declinedI have an idea about using hook and GUI, but I have a feeling that I have already tired the team with my requests and ideas)
it looks more like a nginx question than opnsense one.but tell more detail what the user is typing, what the request to the upstream should be (perhaps url rewrite is required). in first and second cases you use different server names..details of 404 errors can be viewed in the "HTTP Error Logs"
root@OPNsense:~ # cd / && du -ma | sort -nr | head -n 2050463 .32519 ./var31071 ./var/log30435 ./var/log/nginx30430 ./var/log/nginx/ds1.xxxxxx.xx.error.log
Is it normal?
whats in log?