Welcome! Log In Create A New Profile

Advanced

include in if

August 25, 2010 07:09AM
nginx version: nginx/0.8.49

I would like to serve static files by default, in the absence - uwsgi_pass.
So I wrote this:

server {
listen 80;
server_name www1;
location / {
root /var/www/1/public;
if (!-f $request_filename) {
include /etc/nginx/params_uwsgi;
uwsgi_pass unix:/var/www/1.sock;
}
}
}


Unfortunately, I have:
Restarting nginx: [emerg]: "include" directive is not allowed here in line 7.

would it not be able to do "include" inside "if" ?!
any advice ?
Subject Author Posted

include in if

ddarko August 25, 2010 07:09AM

Re: include in if

Maxim Dounin August 25, 2010 07:42AM

Re: include in if

ddarko August 25, 2010 12:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 287
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready