2

As you know when you install nginx, it comes with default pool called www and a default site called default.

How can I safely remove these two? Because I have created a new pool and site and I want to release some resources by deleting these.

3
  • Did you try going to sites-enabled and delete the symlink to default? – shinjijai Aug 10 '17 at 20:01
  • Nginx does not have pools. Are you referring to PHP pools? In general with Nginx if you want to remove a site defined in its own file you just delete the file and restart. – Tim Aug 10 '17 at 21:08
  • Yeah sorry I am talking about php-fpm pools. – Frank Martin Aug 11 '17 at 13:50
3

Your file locations and service names might be a bit different, but you just need to delete the two configs and reload:

  1. Delete the pool configuration file /etc/php/7.0/fpm/pool.d/www.conf
  2. Delete the default site configuration file /etc/nginx/sites-available/default and its symlink /etc/nginx/sites-enabled/default
  3. Reload nginx sudo service nginx reload
  4. Reload fpm sudo service php7.0-fpm reload
1
  • 2
    You can leave the configuration file in sites-available, since it won't be enabled unless it's linked to sites-enabled. Up to you. – Zenexer Aug 12 '17 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.