Last active
July 6, 2020 09:15
-
-
Save DastanIqbal/7889cbb71b22fd46a3644ba6b7736899 to your computer and use it in GitHub Desktop.
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
sudo add-apt-repository universe | |
sudo apt install nginx php7.2 php7.2-fpm git software-properties-common php7.2-mbstring php7.2-xml composer unzip composer | |
## Optional PHP Plugins | |
sudo apt install memcached php-memcache php-pear php-imagick php7.2-cgi php7.2-mysql php7.2-curl php7.2-gd php7.2-imap php7.2-tidy php7.2-xmlrpc php7.2-xsl php7.2-mbstring php7.2-zip php7.2-cli | |
git clone https://github.com/org/project.git #replace url | |
# Setup Nginx | |
nano /etc/nginx/sites-available/<domainname> | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name _; | |
root /root/project/src/public/; | |
index index.php; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
include snippets/fastcgi-php.conf; | |
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; | |
} | |
} | |
ln -s /etc/nginx/sites-available/<domainname> /etc/nginx/sites-enabled/ | |
sudo nginx -t | |
systemctl reload nginx | |
cd project | |
chown -R www-data:www-data . | |
#PHP Project | |
composer install | |
composer update | |
composer dump-autoload | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment