0% found this document useful (0 votes)
5 views

Nginx Server

Uploaded by

akhilsenthilumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Nginx Server

Uploaded by

akhilsenthilumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

### Nginx and Php-fpm Download ###

sudo apt update

sudo apt install nginx

sudo apt install php7.4-fpm

### Configuration php7.4-fpm ###

## Go for the below path and edit the missing content ##

sudo nano /etc/nginx/sites-enabled/default

server {
listen 80;
server_name your_domain.com;

root /var/www/html;
index index.php index.html index.htm;

location / {
try_files $uri $uri/ =404;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
}

## After modifying please check the below command ##

sudo nginx -t

### Configure the info.php ###

## Go for the below path and insert the content from info.php ##

sudo nano /var/www/html/info.php

<?php phpinfo(); ?>

### Finally restart the service ###


sudo systemctl restart nginx

sudo systemctl restart php7.4-fpm

######### Project Setup #########

## Clone completed below path ##

cd /var/www/html/

listen 80 default_server;
listen [::]:80 default_server;

You might also like