php

PHP and NGINX on Amazon Linux AMI

Install NGINX

sudo yum install nginx -y

Install PHP and PHP-FPM

sudo yum install php -y
sudo yum install php-fpm -y

Configure NGINX (see below)

sudo nano /etc/nginx/conf.d/default.conf
server {
    listen 80;
    server_name www.exampledomain.tld exampledomain.tld;

    location / {
        root   /var/www/html;
        index  index.php index.html index.htm;
    }

    location ~ \.php$ {
        root /var/www/html;
Tags 
php nginx ami


QR Code for https://setupexample.com/tags/php