64 lines
1.4 KiB
Plaintext
64 lines
1.4 KiB
Plaintext
### BBB
|
|
upstream semaphore {
|
|
server semaphore-app:3000;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
server_name semaphore.tips-of-mine.local;
|
|
server_tokens off;
|
|
|
|
if ($host = semaphore.example.com) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
return 404;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
|
|
server_name semaphore.tips-of-mine.local;
|
|
client_max_body_size 0;
|
|
chunked_transfer_encoding on;
|
|
server_tokens off;
|
|
|
|
ssl_certificate /etc/nginx/ssl/semaphore_ssl.cert;
|
|
ssl_certificate_key /etc/nginx/ssl/semaphore_ssl.key;
|
|
|
|
location / {
|
|
proxy_pass http://semaphore/;
|
|
|
|
proxy_set_header Host $http_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_connect_timeout 30;
|
|
proxy_send_timeout 30;
|
|
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
}
|
|
|
|
location /api/ws {
|
|
proxy_pass http://semaphore/api/ws;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Origin "";
|
|
}
|
|
|
|
error_page 404 /404.html;
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
#
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|