mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
55 lines
1.3 KiB
Nginx Configuration File
55 lines
1.3 KiB
Nginx Configuration File
# Main NGINX configuration
|
|
user nginx;
|
|
worker_processes auto;
|
|
|
|
# Error log
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
# Events block
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
# HTTP block: Place your server block here
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
# Logging
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
# Gzip compression
|
|
gzip on;
|
|
|
|
# Redirect HTTP to HTTPS
|
|
server {
|
|
listen 80;
|
|
server_name mydomain.local www.mydomain.local;
|
|
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
# HTTPS reverse proxy
|
|
server {
|
|
listen 443 ssl;
|
|
server_name mydomain.local www.mydomain.local;
|
|
|
|
# TLS settings
|
|
ssl_certificate /etc/nginx/ssl/mydomain.local.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/mydomain.local-key.pem;
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
|
|
location / {
|
|
# Points to the HyperDX app service
|
|
proxy_pass http://app:443;
|
|
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;
|
|
}
|
|
}
|
|
}
|