Dhurgh commited on
Commit
7c7b9ba
·
unverified ·
1 Parent(s): 4567b16

Add Nginx setup instructions for Node.js app

Browse files

Added Nginx configuration instructions for setting up a Node.js app with HTTPS support using Certbot.

Files changed (1) hide show
  1. si +41 -0
si ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Paste this in (Tell him to replace yourdomain.com with his actual domain or IP):
2
+
3
+ Nginx
4
+ server {
5
+ listen 80;
6
+ server_name yourdomain.com;
7
+
8
+ location / {
9
+ proxy_pass http://localhost:3000; # This points to your Node.js app
10
+ proxy_http_version 1.1;
11
+ proxy_set_header Upgrade $http_upgrade;
12
+ proxy_set_header Connection 'upgrade';
13
+ proxy_set_header Host $host;
14
+ proxy_cache_bypass $http_upgrade;
15
+ }
16
+ }
17
+ Save and Exit (Ctrl+O, Enter, Ctrl+X).
18
+
19
+ Link the file and restart Nginx:
20
+
21
+ Bash
22
+ sudo ln -s /etc/nginx/sites-available/firetech /etc/nginx/sites-enabled/
23
+ sudo nginx -t
24
+ sudo systemctl restart nginx
25
+ Step 3: Get the SSL Certificate (The "HTTPS" part)
26
+ We use Certbot (from Let's Encrypt) to get the certificate for free.
27
+
28
+ Bash
29
+ sudo apt install -y certbot python3-certbot-nginx
30
+ sudo certbot --nginx -d yourdomain.com
31
+ Certbot will ask for an email and then automatically update the Nginx file to enable HTTPS.
32
+
33
+ Important: Local vs. Public
34
+ If he is on a Local Network: You cannot easily get a "Real" HTTPS certificate for a local IP (like 192.168...). He would have to use a Self-Signed Certificate, but the browser will show a "Danger" warning.
35
+
36
+ If he is Public: He must have a domain name pointed to his IP address for the script above to work.
37
+
38
+ How this affects the Logo/Brand
39
+ In your FireTech promotional video, showing https:// in the browser bar is a "Trust Signal." It shows that your messenger isn't just fast and "on fire," but also secure.
40
+
41
+ Would you like me to show you how to add a "Secure Padlock" icon animation in After Effects that clicks shut next to your Phoenix logo?