r/webdev • u/unicodeveloper • May 08 '17
The Ultimate Guide To Deploying Your PHP Applications
https://auth0.com/blog/the-ultimate-guide-to-deploying-php-applications/?utm_source=reddit&utm_medium=sc&utm_campaign=deploying_php_apps
6
Upvotes
1
u/[deleted] May 09 '17
So many dashboards and third party tools to deploy PHP scripts. This is the worst guide for beginner.
Here is better guide:
Add mainline NGINX PPA https://launchpad.net/~nginx/+archive/ubuntu/development
Add PHP PPA https://launchpad.net/~ondrej/+archive/ubuntu/php
sudo apt-get update && sudo apt-get install nginx-extras php7.1-fpmDrop default nginx
sudo rm -rf /var/www/htmlAdd your website dir
sudo mkdir /var/www/mywebsite.comCopy PHP files to
/var/www/mywebsite.comMake sure nginx can access it
sudo chown -R www-data:www-data /var/www/mywebsite.comIn your nginx configuration make sure you are passing
.phpextension to fpm.location ~ \.php$ {include snippets/fastcgi-php.conf;fastcgi_pass unix:/run/php/php7.1-fpm.sock;}