How to remove Nginx on a RHEL or CentOS

  1. Stop nginx
service nginx stop
  1. Remove package
yum remove nginx
  1. Change vesta configuration
cd /usr/local/vesta/conf
sed -i "/PROXY_*/d" vesta.conf
sed -i "s/8080/80/" vesta.conf
sed -i "s/8443/443/" vesta.conf
  1. Change httpd configuration
cd /etc/httpd/conf.d
sed -i "s/8080/80/" *.conf
sed -i "s/8443/443/" *.conf
  1. Rebuild vhost configs
for user in $(v-list-sys-users plain); do v-rebuild-web-domains $user; done