Deploy MERN STACK App with AWS EC2
git repo: https://github.com/jaewonhimnae/deploy-mern-aws-ec2
Nginx Configuration
/etc/nginx/nginx.conf
user ubuntu;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
client_body_buffer_size 100k;
client_header_buffer_size 1k;
client_max_body_size 100k;
large_client_header_buffers 2 1k;
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;
server_tokens off;
#gzip on; on;
include /etc/nginx/conf.d/*.conf;
}
/etc/nginx/conf.d/default.conf
server {
#listen 80;
listen 80 default_server;
listen [::]:80 default_server;
server_name yourdomain.com;
access_log /home/ubuntu/client/server_logs/host.access.log main;
location / {
root /home/ubuntu/client/deploy;
index index.html index.htm;
try_files $uri /index.html;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
server_tokens off;
location ~ /\.ht {
deny all;
}
}
Видео Deploy MERN STACK App with AWS EC2 канала John Ahn
Nginx Configuration
/etc/nginx/nginx.conf
user ubuntu;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
client_body_buffer_size 100k;
client_header_buffer_size 1k;
client_max_body_size 100k;
large_client_header_buffers 2 1k;
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;
server_tokens off;
#gzip on; on;
include /etc/nginx/conf.d/*.conf;
}
/etc/nginx/conf.d/default.conf
server {
#listen 80;
listen 80 default_server;
listen [::]:80 default_server;
server_name yourdomain.com;
access_log /home/ubuntu/client/server_logs/host.access.log main;
location / {
root /home/ubuntu/client/deploy;
index index.html index.htm;
try_files $uri /index.html;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
server_tokens off;
location ~ /\.ht {
deny all;
}
}
Видео Deploy MERN STACK App with AWS EC2 канала John Ahn
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Where to Host a Fullstack Project on a BudgetDeploy a NodeJS React app to AWS EC2 (EASY!)MERN Stack on AWS EC2 with SSL & Nginx (Production Ready)Deploy MERN STACK App with HEROKUFull Node.js Deployment - NGINX, SSL With Lets EncryptDeploying Full Stack App onto Ubuntu/AWS: Postgres, Express, React, Node + SSL Let's EncryptBuild a CI/CD Pipeline for a React App | AWS CodePipeline Full Tutorial | Code With Me!React + Node.js on AWS - How to Deploy a MERN Stack App to Amazon EC2MERN based Full stack App on AWS EC2 Simplest wayBuild and Deploy a MERN Stack Application | Complete MERN Stack TutorialFastest way to become a software developerDEPLOY A WEB APP TO THE CLOUD WITH AWS AMPLIFY AND AWS CDKHow to deploy a MERN Stack App to HerokuLearn The MERN Stack [8] - Prepare & DeployBuild A Realtime Chat App In ReactJS and NodeJS | Socket.io TutorialHosting your own Node/React/Next App using a VPS - Linode/Digital OceanDeploy Node app on AWS EC2 Amazon Linux 2MERN Stack Course - ALSO: Convert Backend to Serverless with MongoDB RealmUpload Images to S3 from Node Back End