You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to add an if block inside an ginx::resource::location using location_cfg_append/prepend does not work as a trailing ; is appended to the closing }.
Looking at the generated conf file I can clearly see that a ; is after the closing } and nginx complains about it
Error: /Stage[main]/Nginx::Service/Service[nginx]: Could not restart Service[nginx]: Execution of '/sbin/service nginx restart' returned 1: nginx: [emerg] unexpected ";" in /etc/nginx/sites-enabled...
What is the right way to add an if block inside a location element?
The text was updated successfully, but these errors were encountered:
mezezo
changed the title
Issu adding if blocks inside a location
Problem adding if blocks inside a location using location_cfg_append/prepend
May 5, 2014
Use location_custom_cfg_append instead. It doesn't add the trailing ;.
If you do replace your location_cfg_append with location_custom_cfg_append you'll have to manually add the trailing ; to every directive (i.e. your try_files, expires)
Trying to add an if block inside an ginx::resource::location using location_cfg_append/prepend does not work as a trailing ; is appended to the closing }.
Looking at the generated conf file I can clearly see that a ; is after the closing } and nginx complains about it
Error: /Stage[main]/Nginx::Service/Service[nginx]: Could not restart Service[nginx]: Execution of '/sbin/service nginx restart' returned 1: nginx: [emerg] unexpected ";" in /etc/nginx/sites-enabled...
What is the right way to add an if block inside a location element?
The text was updated successfully, but these errors were encountered: