Welcome! Log In Create A New Profile

Advanced

User Variables in Nginx config files

Posted by techtonik 
User Variables in Nginx config files
June 16, 2011 11:53AM
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/;
}
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready