Stuck at setting up FastCGI Caching with Nginx

March 26, 2018 382 views
Nginx Ubuntu 16.04

I am trying to set up FastCGI Caching with Nginx so I followed the tutorial given in the link https://www.digitalocean.com/community/tutorials/how-to-setup-fastcgi-caching-with-nginx-on-your-vps but the problem is when I run the command

nano /etc/nginx/sites-enabled/vhost

the file opens up for editing but the file is blank,there is no "server { } directive" or the "location ~ .php$ { }" field,there is no such thing.

This is getting me worried cause the file itself is blank but the tutorial states that the file will contain some statements,so have I been missing some steps in my set Nginx set up? but my Nginx works perfectly fine and I could install Wordpress,plugins and even customize my theme and settings.

And note I did not install SSL so is that why the file is blank or is there any other probable reason?

Thank you.

2 Answers

You need to replace vhost with the file name of the virtual host that you are editing. You can see a list of available files by running ls /etc/nginx/sites-enabled/.

Well I solve this by using the command

sudo nano /etc/nginx/sites-available/default

That is where all the modification is to be made including for plugins like Wp Super Cache!!

Have another answer? Share your knowledge.