-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.example.conf
More file actions
48 lines (40 loc) · 1.49 KB
/
nginx.example.conf
File metadata and controls
48 lines (40 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Nginx reverse proxy configuration for ACTUFEED
# Place this in your nginx sites-available directory and symlink to sites-enabled
server {
listen 80;
server_name actufeed.com;
# Optional: Redirect HTTP to HTTPS
# return 301 https://$server_name$request_uri;
# For HTTPS, uncomment and configure:
# listen 443 ssl http2;
# ssl_certificate /path/to/certificate.crt;
# ssl_certificate_key /path/to/private.key;
# ssl_protocols TLSv1.2 TLSv1.3;
# ssl_ciphers HIGH:!aNULL:!MD5;
# Increase timeouts for long-running requests
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
# Pass the original Host header to the backend
# This is important for Vite's allowedHosts check
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
# WebSocket support (if needed)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Proxy all requests to the backend server
location / {
proxy_pass http://localhost:3072;
# Or if running in Docker, use the container's IP or Docker network name
# proxy_pass http://actufeed-app:3072;
}
# Optional: Health check endpoint
location /health {
proxy_pass http://localhost:3072;
access_log off;
}
}