-
-
Save azole/5df37b8aca8715b807e24843ff082af3 to your computer and use it in GitHub Desktop.
Install drupal 8.9 with Nginx and php-fpm 7.4 in Ubuntu 20.04
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
sudo apt-get update | |
sudo apt-get install nginx -y | |
sudo apt-get install php7.4-fpm php7.4-cli php7.4-gd php7.4-mysql php7.4-xml php7.4-mbstring -y | |
# edit /etc/php/7.4/fpm/php.ini | |
sudo nano /etc/php/7.4/fpm/php.ini | |
# uncomment cgi.fix_pathinfo and set the value to "0" | |
sudo nano /etc/nginx/sites-available/default | |
# uncomment ~\.php section and modify as followed: | |
# location ~ \.php$ { | |
# include snippets/fastcgi-php.conf; | |
# fastcgi_pass 127.0.0.1:9000; | |
# } | |
sudo nano /etc/php/7.4/fpm/pool.d/www.conf | |
# modify listen to: | |
# listen = 127.0.0.1:9000 | |
sudo nginx -t | |
sudo systemctl restart nginx | |
sudo systemctl restart php7.4-fpm | |
# install drupal | |
sudo mkdir -p /srv/www/drupal.lightda.io/{public_html,logs} | |
sudo chown -R www-data:www-data /srv/www | |
sudo chmod -R 775 /srv/www | |
sudo nano /etc/nginx/sites-available/drupal.lightda.io | |
# refer to nginx settings | |
sudo ln -s /etc/nginx/sites-available/drupal.lightda.io /etc/nginx/sites-enabled/ | |
sudo systemctl restart nginx | |
sudo rm /etc/nginx/sites-enabled/default | |
cd /srv/www/drupal.lightda.io | |
sudo wget https://ftp.drupal.org/files/projects/drupal-8.9.19.tar.gz | |
sudo tar -xvzf drupal-8.9.19.tar.gz | |
sudo cp drupal-8.9.19/* public_html -R | |
sudo chown www-data:www-data public_html -R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment