PHP: How to Host on AWS with LEMP (Fast & Easy)

Опубликовано: 07 Апрель 2026
на канале: Code with Jay
5,067
35

This tutorial content will make you understand how we can set up a LEMP (Linux Nginx Mysql and PHP) on AWS instance along with how we can map our domain name with AWS instance to serve web contents. Hope it will be helpful for people out there.

Nginx configuration file Content
-------------
server {
listen 80;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name jgogoi.online;

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

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

location ~ /\.ht {
deny all;
}
}

If you wish! You can buy me a Coffee:
https://www.buymeacoffee.com/jgogoi