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/example.com have in the end include common/php.conf;

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

@Amanpreet_Singh

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

ee site create example.com --wpredis

You do not need to follow rest of guide.

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

@Amanpreet_Singh

Just update site with command ee site update example.com --wpredis

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

But now if i do ee update site mydomain.com i still get site does not exist, even though it is available in sites-enabled, and sites-available, and i can go to mydomain.com 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.