Hey @minorsatellite
First I like to apologies for over looking your post.
Perhaps something like this
server {
listen 443 ssl;
server_name graylog.mydomain.com;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Graylog-Server-URL https://domain.com/api;
proxy_pass http://127.0.0.1:9000;
# proxy_pass http://ip-address:9000;
}
ssl on;
ssl_certificate /etc/graylog/graylog.domain.pem;
ssl_certificate_key /etc/graylog/graylog.domain-key.pem;
ssl_session_timeout 5m;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/graylog.access.log;
error_log /var/log/nginx/graylog.error.log;
}
# http to https redirection
server {
listen 80;
server_name graylog.mydomain.com;
add_header Strict-Transport-Security max-age=2592000;
rewrite ^ https://$server_name$request_uri? permanent;
}
Two things that would help is using
server {
listen 443 ssl;
And the redirect from 80 → 443
rewrite ^ https://$server_name$request_uri? permanent;