Hello,
Digging deeper made be found that if I put only variable, nginx consider it as relative path, even if it is an absolute path.
So,
set $accesslog "/home/website1/error.log";
access_log $accesslog main;
is not working (it leads to /usr/local/openresty/nginx/home/website1/error.log
), but
set $accesslog "website1/error.log";
access_log /home/$accesslog main;
is working.