generate-ssl
generate-ssl
📌 Explanation:
sudo ls /etc/letsencrypt/live/galambo.com/
Cisco Confidential
1. Open the Nginx config file:
2. sudo nano /etc/nginx/sites-available/glambo
3. Replace the contents with this:
4. server {
5. listen 80;
6. server_name galambo.com www.galambo.com;
7. return 301 https://$host$request_uri; # Redirect HTTP to HTTPS
8. }
9.
10. server {
11. listen 443 ssl;
12. server_name galambo.com www.galambo.com;
13.
14. ssl_certificate
/etc/letsencrypt/live/galambo.com/fullchain.pem;
15. ssl_certificate_key
/etc/letsencrypt/live/galambo.com/privkey.pem;
16.
17. ssl_protocols TLSv1.2 TLSv1.3;
18. ssl_ciphers HIGH:!aNULL:!MD5;
19.
20. location / {
21. proxy_pass http://localhost:3000; # Redirect frontend
traffic to React
22. proxy_http_version 1.1;
23. proxy_set_header Upgrade $http_upgrade;
24. proxy_set_header Connection 'upgrade';
25. proxy_set_header Host $host;
26. proxy_cache_bypass $http_upgrade;
27. }
28.
29. location /api/ {
30. proxy_pass http://localhost:4000; # Redirect backend API
requests
31. proxy_http_version 1.1;
32. proxy_set_header Upgrade $http_upgrade;
33. proxy_set_header Connection 'upgrade';
34. proxy_set_header Host $host;
35. proxy_cache_bypass $http_upgrade;
36. }
37. }
38. Save and Exit (CTRL + X, then Y, then ENTER).
Cisco Confidential
🔹 Step 6: Allow HTTPS Traffic (Port 443)
in Firewall
Ensure your firewall allows HTTPS (port 443) and HTTP (port 80):
https://galambo.com
If the test works, Certbot will automatically renew SSL when needed.
Cisco Confidential