Typically my nginx config looks like this:
server {
listen 80;
server_name example.com;
<some long config>
}
server {
listen 443;
server_name example.com;
ssl on;
ssl_certificate qwe.crt;
ssl_certificate_key qwe.key;
<the same long config>
}
How to forward all https requests to http server directive (not send redirect to client but forward within nginx) so that I will not need to write the same config twice?