I am actually building a webdav server using nginx behind a Traefik and Authelia as middleware for ldap auth. I confirmed with debugging that both the variables $http_remote_user and $http_remote_groups exists and contained data. However on startup nginx throw me that error saying
[emerg] 1#1: unknown "remote_groups" variable
I am sure the line that causes that is the line
sub_filter '${REMOTE_GROUPS}' $http_remote_groups;
of the following config since removing it from the config solve the problem. The thing is that I need this for my index.html to get the user uid and groups.
Here is the part of the config that causes the crash. I can provide more if needed :)
###### ROOT DIRECTORY ######
location / {
# Refuse all methods except GET
limit_except GET {
deny all;
}
# Prevent access to hidden files
location ~ /\. {
deny all;
return 404;
}
# Root path
root /media/data;
# Use sub_filter to replace placeholders with actual values
sub_filter '${REMOTE_USER}' $http_remote_user;
sub_filter '${REMOTE_GROUPS}' $http_remote_groups;
sub_filter_once off;
}