This tutorial is for Debian and Ubuntu (but probably can give you a good direction for CentOS).
PHP will run through PHP-FPM, which is much more faster solution than other existent PHP-switcher that uses only old phpfcgid solution (because with PHP-FPM you can use opcache).
Communication to PHP-FPM will goes through Unix-sockets, which is also the fastest communication between daemons.
Second tutorial goes a step forward - it will allow you to make direct communication from nginx to PHP-FPM, avoiding Apache for desired domains (Apache is installed by default in default Vesta installation).
So, yes, you can easily make nginx <-> PHP-FPM stack even if you have Apache installed.
And yet better news - you can use it only on desired domains - so all other domains will stay untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables. | |
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding. | |
Network configuration | |
Here’s how it’s done: | |
Create a virtual interface that serves as the gateway for your VMs: |