Skip to content

Instantly share code, notes, and snippets.

@whizyrel
Last active April 21, 2023 11:05
Show Gist options
  • Select an option

  • Save whizyrel/4ea5348bb5be91853d804b8aec50449a to your computer and use it in GitHub Desktop.

Select an option

Save whizyrel/4ea5348bb5be91853d804b8aec50449a to your computer and use it in GitHub Desktop.
server {
server_name api-ashgrid.ashipaelectric.com;
listen 80;
listen [::]:80;
location /electric-utility {
return 301 https://$host:443$request_uri;
}
}
server {
server_name api-ashgrid.ashipaelectric.com;
listen 443 ssl http2;
listen [::]:443 ssl http2;
location /electric-utility {
proxy_pass http://localhost:5000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $http_host;
proxy_pass_request_headers on;
proxy_cache_bypass $http_upgrade;
}
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment