Created
November 16, 2020 07:52
-
-
Save trinvh/7dea2775d65f130fb9df39c85090556e to your computer and use it in GitHub Desktop.
This file contains 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
# install php repository | |
add-apt-repository ppa:ondrej/php && apt update -y | |
# install php7.3 and extensions | |
apt install php7.3 php7.3-fpm php7.3-mbstring php7.3-zip php7.3-gd php7.3-mysql php7.3-curl | |
# configure php7.3-fpm default pool to run as nginx and listen on specific port instead of unix socket | |
# open config file with your favourite editor and replace `group www-data` and `user www-data` with `group nginx` and `user nginx` | |
# replace `listen /somewhere/php.sock` to `listen 9003` | |
# vim /etc/php/7.3/fpm/pool.d/www.conf | |
# restart php7.3-fpm service | |
systemctl restart php7.3-fpm | |
# configure nginx to pass cgi to php7.3-fpm | |
# vim /opt/nginx/site-enabled/xxx.conf replace `fastcgi_pass unix://var/run/php-fpmxxx` to `fastcgi_pass 127.0.0.1:9003` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment