hoping someone can help with https for netbox either direct or redirect. I have followed the netbox guide but I cannot get https to work, only http.
[netbox@netbox netbox]$ pwd
/etc/nginx/sites-enabled/netbox/netbox
[netbox@netbox netbox]$ cat nginx.conf
server {
listen [::]:443 ssl ipv6only=off;
# CHANGE THIS TO YOUR SERVER'S NAME
server_name 10.44.193.136;
ssl_certificate /etc/ssl/certs/netbox.crt;
ssl_certificate_key /etc/ssl/private/netbox.key;
client_max_body_size 25m;
location /static/ {
alias /opt/netbox/netbox/static/;
}
location / {
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
# Redirect HTTP traffic to HTTPS
listen [::]:80 ipv6only=off;
server_name 10.44.193.136;
return 301 https://$host$request_uri;
}