Rewrite Issue Nginx failed to start

Started by toomanylogins, July 29, 2022, 12:00:48 PM

Previous topic - Next topic
July 29, 2022, 12:00:48 PM Last Edit: July 29, 2022, 03:31:57 PM by toomanylogins
OPNsense 22.1.10. Nginx failed to start with this error

invalid number of arguments in "rewrite" directive in /usr/local/etc/nginx/nginx.conf:2302

I have been testing rewrite rules and created a few then deleted them. In nginx conf line 2302 there was the following,

include 2b940020-1678-409e-a6b1-1760fdd107cb_pre/*.conf;
rewrite ;
rewrite ;

So it looks like the rule is deleted but not the line rewrite ;

Spoke to soon. If you restart/refresh config the lines reappear in nginx.conf

How do I resolve this delete the include line as well ?