Nginx: configuration file test failed

Hi I have been trying to setup Redis on EE installation, i followed this guide

After following everything i run this command, nginx -t && service nginx reload

And i got error nginx: [emerg] “location” directive is not allowed here in /etc/nginx/common/php.conf:3 nginx: configuration file /etc/nginx/nginx.conf test failed

PS: my /etc/nginx/sites-available/ have in the end include common/php.conf;

include common/wpcommon.conf;
include common/locations.conf;
include /var/www/*.conf;


You can setup redis foe a site with this single command if you are using EasyEngine.

ee site create --wpredis

You do not need to follow rest of guide.

I had already setup the site with ee site create --wp so i wanted to add redis support now


Just update site with command ee site update --wpredis

Hi @harshadyeola I did my initial setup on and now i moved my site to, and followed one of your tutorials. But got stuck at last point ee enable site, i was getting error site does not exist So i manually created soft link so is is available in sites-enabled

But now if i do ee update site i still get site does not exist, even though it is available in sites-enabled, and sites-available, and i can go to and i see the site but somehow i cant do anything on it will ee any more do you know how to fix it as i will like to get redis and letsencrypt to setup on it.