Last active
August 29, 2021 11:43
-
-
Save rickheil/a36a2cd8ebe326b304c3 to your computer and use it in GitHub Desktop.
nginx configuration for graylog reverse proxy, HTTPS forced
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443; | |
server_name graylog.example.com; | |
ssl_certificate /etc/nginx/path-to-your-cert.crt; | |
ssl_certificate_key /etc/nginx/path-to-your-key.key; | |
ssl on; | |
ssl_session_cache builtin:1000 shared:SSL:10m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; | |
ssl_prefer_server_ciphers on; | |
access_log /var/log/nginx/graylog.access.log; | |
location / { | |
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_pass http://localhost:9000; | |
proxy_read_timeout 90; | |
proxy_redirect http://localhost:9090 https://graylog.example.com; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this line ok?
proxy_redirect http://localhost:9090
should'nt be 9000?