nginx config files have unexpected dependancies to one another
Concerned version
Version: %2.0 Platform: Nginx, Debian
Summary
- Do a normal LLNG installation from packages
- Decide that you don't want to have the tests vhosts anymore because you are configuring your prod server
- Remove test-nginx.conf from /etc/nginx/sites-enabled
- Nginx no longer restarts
Logs
nginx: [emerg] unknown "lmremote_user" variable
lmremote_user
is declared in test-nginx.conf, and is only useful for handlers. However, it is referenced in nginx-lmlogs.conf in the definition of the lm_combined
log format
If you decide that you don't need the lm_combined log format, you're still out of luck! Because the lm_app
log format, used in the manager and portal vhosts, depend on $lmremote_custom
, which is also defined in test-nginx.conf
Possible fixes
I suggest the following:
- Change
lm_app
to no longer use$lmremote_custom
since it doesn't exist in the vhosts that use it - Add a dummy declaration for
$lmremote_user
inhandler-nginx.conf
so that the error no longer appears when the test vhosts are disabled.