server { listen 80; server_name opnsense.example.org; return 301 https://$host$request_uri;}server { listen 443 ssl http2; server_name opnsense.example.org; location / { proxy_pass http://172.31.0.1; }}
location / { proxy_http_version 1.1; proxy_set_header Connection ""; proxy_pass http://172.31.0.1; }