nginx plugin and some custom settings like worker_rlimit_nofile

Started by mrpsycho, July 28, 2021, 09:40:02 PM

Previous topic - Next topic
Hello,

what is the best way to setup custom settings for nginx reverse-proxy in main part?

for example, i need to configure `worker_rlimit_nofile`?
i saw, that `worker_connections` exist on main configuration in UI... but what about things, which are not added?

also, is it possible to add some vhost.conf file, instead of configuring all thru UI?
would be cool, actually, if there will be special place in `Other` tab to add custom config, where it will be possible to add some things which are not implemented in UI.

ps. why? as it suggested by vendor: https://www.jetbrains.com/help/youtrack/standalone/Reverse-Proxy-Configuration.html#Nginx_Config

A custom vhost can be added but not the global settings. Global settings require a pull request for the plugin.

VHost Include:
https://github.com/opnsense/plugins/blob/master/www/nginx/src/opnsense/service/templates/OPNsense/Nginx/http.conf#L75

If you don't want the nginx to be controlled by the plugin, you can also install and configure it by hand. The installation command would then be pkg install nginx
Please note that OPNsense will ship nginx with some additional modules, where some cannot be fully disabled. For example naxsi (the WAF).