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 ?