filmov
tv
Deploy MERN App with Hostinger VPS in 10 Steps || Ubuntu || Git Actions
![preview_player](https://i.ytimg.com/vi/2-HPuTkdiBQ/maxresdefault.jpg)
Показать описание
1. Connecting to Your VPS Using SSH - Starting with establishing a secure connection to your VPS, ensuring a safe and exclusive access environment for your deployment.
2. Updating the VPS - Keeping your server up to date with the latest packages and security patches to ensure optimal performance and security.
sudo apt-get update and sudo apt-get upgrade
3. INSTALL NODE.JS:
source ~/.bashrc
4. INSTALL MONGODB
sudo apt update
sudo apt install mongodb-org -y
sudo systemctl start mongod
sudo systemctl enable mongod
Install git:
sudo apt-get install git-all
5. INSTALL PM2
6. INSTALL NGINX
sudo apt install nginx -y
7. Configure NGINX as a reverse proxy for your application. Create and edit a new configuration file:
server {
listen 80;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
8. Enable the configuration by creating a symlink and then test and reload NGINX:
sudo nginx -t
sudo systemctl reload nginx
9. Secure Your Application with SSL (HTTPS)
Install Certbot and the NGINX plugin:
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
10. Open Necessary Ports in the Firewall
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw enable
sudo ufw status
#MERNStack #WebDevelopment #FullStackDeveloper #CodingTutorial #HostingerVPS #UbuntuServer #NodeJS #ReactJS #MongoDB #NginxProxy #DevOps #WebHosting #SSLSetup #JavaScript #PM2 #CodingLife #TechTutorial #ProgrammerLife #WebAppDeployment #SecureHosting
Комментарии