Skip to content

Instantly share code, notes, and snippets.

@tmrbaset
tmrbaset / Vesta php selector.md
Last active July 20, 2020 13:39
HP selector for PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 for Debian & Ubuntu (and optionally directly nginx-PHP-FPM)

VestaCP: This tutorial will enable PHP 5.6, 7.0, 7.1, 7.2, 7.3 and 7.4 to specific/desired domains.

Original link
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.
@tmrbaset
tmrbaset / proxmox-proxy
Created June 2, 2020 13:13 — forked from basoro/proxmox-proxy
Running Proxmox behind a single IP address
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: