Page 1 of 1

Nginx reinstall

Posted: Fri Jul 18, 2014 3:06 pm
by awesome
I am using vestacp on my server and thank you developers for this good and free panel :)
For some reason I decided and removed nginx from my server (Centos x64) with the method
in this site under documentation section.
Now I want to reinstall nginx into vestacp smoothly. I mean my websites are up and
do not want any problem after installing nginx. Is it possible and how ?
Btw if you need, my vestacp version is 0.9.8

Re: Nginx reinstall

Posted: Fri Jul 18, 2014 4:33 pm
by imperio

Code: Select all

service reinstall nginx

Re: Nginx reinstall

Posted: Sun Jul 20, 2014 11:40 am
by erldcrtz
awesome wrote:Thanks for reply but
it says: reinstall: unrecognized service
he probably meant

(CentOS)
yum reinstall nginx or yum install nginx

Re: Nginx reinstall

Posted: Sun Jul 20, 2014 12:40 pm
by imperio

Code: Select all

yum remove nginx
yum install nginx
service nginx start

Re: Nginx reinstall

Posted: Sun Jul 20, 2014 1:01 pm
by awesome
Thanks for replies..

While uninstalling I did below steps, (based on documentation page). Now for reinstalling anything necessery
for step 3 4 5 or just installing nginx would be ok?
http://vestacp.com/docs/#how-to-remove-nginx-rhel-centos wrote:1. Stop nginx
service nginx stop

2. Remove package
yum remove nginx

3. 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/433/" vesta.conf

4. Change httpd configuration
cd /etc/httpd/conf.d
sed -i "s/8080/80/" *.conf
sed -i "s/8443/443/" *.conf

5. Rebuild vhost configs
for user in $(v-list-sys-users plain); do v-rebuild-web-domains $user; done

Re: Nginx reinstall

Posted: Mon Jul 21, 2014 8:20 pm
by imperio
3.
Add this lines after WEB_SSL_PORT='8443' in vesta.conf

Code: Select all

PROXY_SYSTEM='nginx'
PROXY_PORT='80'
PROXY_SSL_PORT='443'
4.
/etc/httpd/conf.d

Find this file
server_ip.conf

Change ports

Code: Select all

NameVirtualHost server_ip:8080
Listen server_ip:8080
NameVirtualHost server_ip:8443
Listen server_ip:8443
5.
Rebuild web for all users

In the next time dont remove nginx
you can disable nginx in the settings of your domain