Accidently deleted nginx config from sites-available

I’ve deleted by mistake nginx config file for my wordpress site from /etc/nginx/sites-available. Is it possible to recreate it?

Give it a try:

touch /etc/nginx/sites-available/
ee site update --wp
ee site update --wpredis

In this example I assume you usually configures your domains with --wpredis. First you disable the cache, what forces EE to create a brand new vhost file; then you update the same domain to activate wpredis — what will make EE to create the vhost file you want.

I didn’t test, I don’t know if this will work. My suggestion is just a starting point for you.

EasyEngine puts /etc/nginx/sites-available and other config files/folder under git version control.

Depending on what you have done after deleting config files you can easily recover a past version using git commands.

Just cd /etc/nginx/sites-available and start playing commands like git status , git log.

If you are not familiar with git then please backup entire /etc/nginx before running git commands.

Thanks, it helped.

Good point. +1