Page 1 of 1

Replace NGINX only Installation with Apache

Posted: Wed May 18, 2016 7:12 am
by RaZZe
Hi,

is it possible to replace my NGINX only installation with a apache or Apache+Nginx installation ?

Greetings RaZZe

Re: Replace NGINX only Installation with Apache

Posted: Wed May 18, 2016 2:30 pm
by tjebbeke
I don't think it's easy. The best and maybe fastest way is to backup your users, reinstall your server with vestaCP and import the backups.

Re: Replace NGINX only Installation with Apache

Posted: Thu May 19, 2016 12:56 pm
by RaZZe
tjebbeke wrote:I don't think it's easy. The best and maybe fastest way is to backup your users, reinstall your server with vestaCP and import the backups.
No way. Need a solution with fewer Downtime and a Mailserver downtime is not possible.

Re: Replace NGINX only Installation with Apache

Posted: Fri May 20, 2016 7:50 am
by Elizine
First, you need to stop nginx so it releases port 80 so that apache2 can listen to it later on.

Code: Select all

sudo service nginx stop
Next, if nginx was installed with apt-get, removing it would be as simple as

Code: Select all

sudo apt-get remove nginx
Instead, you can also use

Code: Select all

sudo apt-get purge nginx
First one removes all package files, while the second also removes the configuration files.
If you intend to use nginx later on with the configuration you did, use remove. Else, I would suggest using purge.

After removing nginx, you can restart apache to make sure it is listening to port 80.

Code: Select all

sudo apache2ctl restart
If you had removed apache before installing nginx, you can re-install it with

Code: Select all

sudo apt-get install apache2

Re: Replace NGINX only Installation with Apache

Posted: Mon May 23, 2016 8:27 pm
by fossxplorer
And...what about vhost for the newly installed Apache??

Re: Replace NGINX only Installation with Apache

Posted: Mon May 23, 2016 8:50 pm
by tjebbeke
It isn't that easy. You need to change vesta config files, Nginx configs, Apache configs, ...
Maybe you can take a look at the install script and use some commands to download templates, change configs.

The easiest way from Nginx only is to Nginx + Apache. You only need to add Apache, some templates and modify some config files. You can install Apache when Nginx stays running to prevent downtime.

From Nginx to Apache only is hard I think. You need to change ports, ...


https://github.com/serghey-rodin/vesta/ ... er/install

If you think it is too difficult, maybe I can help you, send me a PM.