Created
January 14, 2020 09:22
-
-
Save skngetich/bd51a2d352a11f588a9ce0bd04858e81 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 7 | |
sudo apt-get install software-properties-common -y | |
sudo add-apt-repository ppa:ondrej/php -y | |
sudo apt-get update | |
sudo apt-get install php7.2 php7.2-fpm php7.2-mbstring php7.2-mysql php7.2-curl -y | |
sudo service php7.2-fpm restart | |
#Configure Nginx with php-fpm | |
sudo nano /etc/nginx/sites-available/default | |
Add index.php before index.html and after the index directive. | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
location ~ \.php$ { | |
include snippets/fastcgi-php.conf; | |
With php7.0-cgi alone: | |
fastcgi_pass 127.0.0.1:9000; | |
With php7.0-fpm: | |
fastcgi_pass unix:/run/php/php7.2-fpm.sock; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment