Install and Configure nginx on Linux

preview_player
Показать описание
#nginx #WebServer #PHP #InstallGuide

   01. Log into the Linux device
   02. Run the following commands in a terminal window
         # update software repositories
         sudo apt update
         # install available software updates
         sudo apt upgrade -y
         # install nginx and php
         sudo apt install nginx php7.3-fpm php7.3-common php7.3-mysql php7.3-gmp php7.3-curl php7.3-intl php7.3-mbstring php7.3-xmlrpc php7.3-gd php7.3-xml php7.3-cli php7.3-zip php7.3-soap php7.3-imap
         # set the owner of the web root
         sudo chown -R www-data /usr/share/nginx/html
         # edit the nginx config to add PHP support
         server {
             listen 80;
             listen [::]:80;
             root /usr/share/nginx/html;
             server_name localhost;
             location / {
                 try_files $uri $uri/ =404;
             }
             location ~ \.php$ {
             }
         }
   05. Continue with the following commands
         # restart nginx service
         sudo systemctl restart nginx
         # create a test phpinfo file
   06. Paste the following into the .php page
         ≪?php
             phpinfo();
         ?≫
 

### Connect with me and others ###
Рекомендации по теме
Комментарии
Автор

Can we talk about how the title says "Windows" and we're running Linux.

chrisfiala
Автор

But why are you rushing tho 😢

I couldn't get anything. Ha

yaakumiasare-bediako