Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Nginx reinstall

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
awesome
Posts: 2
Joined: Fri Jul 18, 2014 11:35 am

Nginx reinstall
  • Quote

Post by awesome » Fri Jul 18, 2014 3:06 pm

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
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Nginx reinstall
  • Quote

Post by imperio » Fri Jul 18, 2014 4:33 pm

Code: Select all

service reinstall nginx
Top

erldcrtz
Posts: 73
Joined: Tue Jun 10, 2014 6:16 am

Re: Nginx reinstall
  • Quote

Post by erldcrtz » Sun Jul 20, 2014 11:40 am

awesome wrote:Thanks for reply but
it says: reinstall: unrecognized service
he probably meant

(CentOS)
yum reinstall nginx or yum install nginx
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Nginx reinstall
  • Quote

Post by imperio » Sun Jul 20, 2014 12:40 pm

Code: Select all

yum remove nginx
yum install nginx
service nginx start
Top

awesome
Posts: 2
Joined: Fri Jul 18, 2014 11:35 am

Re: Nginx reinstall
  • Quote

Post by awesome » Sun Jul 20, 2014 1:01 pm

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
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Nginx reinstall
  • Quote

Post by imperio » Mon Jul 21, 2014 8:20 pm

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
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password