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

How to switch from Nginx+PHP-FPM to Apache+Nginx ?

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
How to switch from Nginx+PHP-FPM to Apache+Nginx ?
  • Quote

Post by Spheerys » Sun Dec 23, 2018 4:31 pm

Hi,

Is it possible to switch from Nginx+PHP-FPM to Apache+Nginx without interrupt for a long time the uptime of the hosted websites ?
If yes, how ?
I'm running debian Jessie 9.5

Thanks :)
Top

mylastore
Posts: 8
Joined: Sun Jun 21, 2020 1:02 am

Os: Ubuntu 17x
Web: apache + nginx
Re: How to switch from Nginx+PHP-FPM to Apache+Nginx ?
  • Quote

Post by mylastore » Sun Nov 29, 2020 5:10 am

so is it possible?
I am on ubuntu 18
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: How to switch from Nginx+PHP-FPM to Apache+Nginx ?
  • Quote

Post by grayfolk » Sun Nov 29, 2020 6:48 am

mylastore wrote: ↑
Sun Nov 29, 2020 5:10 am
so is it possible?
I am on ubuntu 18
Just reinstall Vesta.
Top

Vegas10128
Posts: 38
Joined: Tue Aug 16, 2016 4:58 pm

Re: How to switch from Nginx+PHP-FPM to Apache+Nginx ?
  • Quote

Post by Vegas10128 » Sun Feb 07, 2021 2:56 am

grayfolk wrote: ↑
Sun Nov 29, 2020 6:48 am
mylastore wrote: ↑
Sun Nov 29, 2020 5:10 am
so is it possible?
I am on ubuntu 18
Just reinstall Vesta.
This post is dated, however if your running on the following instances.
Virtual Machine
Dedicated Machine (Physical)

Have a new / separate instance of ubuntu version which vestacp supports. 16.04, 18.04, etc.
Install as a local machine on the same network.

After installation of new instance, login to your current live vesta server and add the following domain on the (primary) Vesta server.
after adding domain login to server via SSH.

Code: Select all

cd /home/admin/conf/web/

Code: Select all

sudo ls
to verify if the domain apache2.conf and nginx.conf files are available for the domain.

Code: Select all

sudo nano exampledomain.com.apache2.conf

Code: Select all

sudo nano exampledomain.com.apache2.ssl.conf
edit virtual ip from the current vestacp server to the 2nd vestacp which has PHP-FPM

Code: Select all

sudo nano exampledomain.com.nginx.conf
Leave the listening IP alone, modify

Code: Select all

proxy_pass      http://XXX.XXX.XX.X:8080;
To the local ip address of the new VestaCP server with PHP-FPM

Code: Select all

sudo nano exampledomain.com.nginx.ssl.conf
Leave the listening IP alone, modify

Code: Select all

proxy_pass      https://XXX.XXX.XX.X:8443;
To the local ip address of the new VestaCP server with PHP-FPM

save file after modification,

Code: Select all

cd /

Code: Select all

sudo service apache2 restart && sudo service nginx restart
Nice! You just forwarded your domain to another VestaCP server which provides and serves PHP-FPM services on the same network using the same public ip address.
No reason to just re-install the machine if you have other websites on that server.

if you do not see

Code: Select all

sudo nano exampledomain.com.apache2.ssl.conf

Code: Select all

sudo nano exampledomain.com.nginx.ssl.conf
It is likely you do not have SSL setup and configured on your server. So disregard the steps needed for changing the following config files.
Top


Post Reply
  • Print view

4 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