Good documentation not only describes what is possible, but also clarifies the limitations. In Nginx docs I coudn't find the explanation if user variables are supported in configuration files. For example, will this configuration work?
ROOT=/var/www/sitex
server {
listen 80;
server_name sitex.example.com;
access_log $ROOT/log/access.log combined;
error_log $ROOT/log/error.log info;
# (Or ``^/some/prefix/(.*)``.
if ($uri ~ ^/(.*)) {
set $path_info /$1;
}
location / {
# socket address
fastcgi_pass unix:$ROOT/run/main-instance.sock;
## WSGI REQUIRED VARIABLES
# ...skipped...
}
location /chrome/ {
alias $ROOT/static/htdocs/;
}
}