Open cca32 opened 1 year ago
Just add the includes to both your port 80 and port 443 config files/blocks. This will reject / block traffic on both ports so in many cases rejecting traffic on port 80 before it even reaches port 443.
Yep that makes sense and is my current approach. Is there a way to structure the nginx files so that the include directive is only used once?
Let's say I have 3 subdomains each with a 443 conf file.
Is it necessary to have a 443 block with include directives for every domain? Or is it possible to apply the include at some larger level that each 443 server block inherits or something
Thanks so much! Great package
Awesome package! Works great. This is a very silly question as my knowledge of
nginx
isn't very strong.I have the following
default.conf
:So it works for all HTTP traffic. I then have other
.conf
files with the correspondinghttps
traffic which do not get protected. Am I using nginx design in an anti-pattern way?What would be the best way to redirect all http traffic to https , and only have to provide the appropriate
include
files only once?Thanks!