2023-03-31 06:52:33 +02:00
|
|
|
# This is an example nginx config for Spacebar.
|
2022-12-19 12:48:25 +01:00
|
|
|
|
|
|
|
server {
|
|
|
|
# Change server_name
|
2023-03-31 06:52:33 +02:00
|
|
|
server_name spacebar.example.com;
|
2022-12-19 12:48:25 +01:00
|
|
|
listen 80;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
# do NOT change this
|
|
|
|
proxy_pass http://127.0.0.1:3001;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_pass_request_headers on;
|
|
|
|
add_header Last-Modified $date_gmt;
|
|
|
|
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Host $remote_addr;
|
|
|
|
proxy_no_cache 1;
|
|
|
|
proxy_cache_bypass 1;
|
|
|
|
|
|
|
|
# this is important
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
}
|
|
|
|
}
|