include in if

ddarko nginx-forum at
Wed Aug 25 15:09:09 MSD 2010

nginx version: nginx/0.8.49
I would like to serve static files by default, in the absence -
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 ?

Posted at Nginx Forum:,123451,123451#msg-123451

More information about the nginx mailing list