28 lines
699 B
Text
28 lines
699 B
Text
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
listen [::]:443 ssl http2;
|
||
|
|
||
|
server_name status.example.com;
|
||
|
|
||
|
access_log /var/log/nginx/access.log;
|
||
|
error_log /var/log/nginx/error.log warn;
|
||
|
|
||
|
ssl_certificate /path/to/cert.pem;
|
||
|
ssl_certificate_key /path/to/cert.key;
|
||
|
|
||
|
# Make Gatus API available relative to the frontend
|
||
|
location /api/v1/endpoints/statuses {
|
||
|
proxy_pass http://gatus:8080/api/v1/endpoints/statuses;
|
||
|
proxy_set_header Host $host;
|
||
|
proxy_redirect http:// https://;
|
||
|
proxy_http_version 1.1;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
}
|
||
|
|
||
|
# Frontend
|
||
|
root /var/www/html;
|
||
|
index index.html index.htm;
|
||
|
location / {
|
||
|
try_files $uri $uri/ =404;
|
||
|
}
|
||
|
}
|