Incorrect log location error

spraguey nginx-forum at
Sun May 5 23:20:19 UTC 2019

I was able to resolve this, but I am not sure exactly why. To simplify my
post, I removed the code that sets a variable for the base path. That's
where the problem is.

set $homedir /webspace/;
root ${homedir}/www;
access_log ${homedir}/log/access.log;

The root works, but access_log did not. NGINX would prepend
/usr/share/nginx/ to it every time and result in the error from my original

If I don't use the variable, it works fine.

access_log /webspace/;

It kind of defeats the purpose of having a variable, but at least it is
working now.

Posted at Nginx Forum:,284035,284041#msg-284041

More information about the nginx mailing list