Is there a way to share configuration directives across two nginx server {}
blocks? I'd like to avoid duplicating the rules, as my site's HTTPS and HTTP content are served with the exact same config.
Currently, it's like this:
server { listen 80; ... } server { listen 443; ssl on; # etc. ... }
Can I do something along the lines of:
server { listen 80, 443; ... if(port == 443) { ssl on; #etc } }