@@ -52,7 +52,8 @@ Open the Nginx configuration file:
52
52
53
53
Add the following configuration. Change YOUR_DOMAIN_NAME with your domain name:
54
54
55
- ``` server {
55
+ ```
56
+ server {
56
57
listen 80;
57
58
server_name YOUR_DOMAIN_NAME;
58
59
return 301 https://$host$request_uri;
@@ -67,20 +68,28 @@ server {
67
68
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
68
69
69
70
location / {
70
- proxy_pass http://localhost:4173;
71
+ proxy_pass http://localhost:4173; # Frontend React app
71
72
proxy_set_header Host $host;
72
73
proxy_set_header X-Real-IP $remote_addr;
73
74
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
74
75
proxy_set_header X-Forwarded-Proto $scheme;
75
76
}
76
77
77
78
location /api/ {
78
- proxy_pass http://localhost:3000;
79
+ proxy_pass http://localhost:3000; # Backend API
79
80
proxy_set_header Host $host;
80
81
proxy_set_header X-Real-IP $remote_addr;
81
82
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
82
83
proxy_set_header X-Forwarded-Proto $scheme;
83
84
}
85
+ location /mailhog/ {
86
+ proxy_pass http://localhost:8025; # MailHog web interface
87
+ proxy_http_version 1.1;
88
+ proxy_set_header Upgrade $http_upgrade;
89
+ proxy_set_header Connection 'upgrade';
90
+ proxy_set_header Host $host;
91
+ proxy_cache_bypass $http_upgrade;
92
+ }
84
93
}
85
94
```
86
95
0 commit comments