Unify torproject.net and freehaven.net Nginx configs on Snowflake broker
/etc/nginx/sites-enabled contains two configuration files that are identical, except for the hardcoded server names they contain:
- https-site-broker-prod (
server_name snowflake-broker.torproject.net
) - https-site-broker-prod-freehaven (
server_name snowflake-broker.freehaven.net
)
I am pretty sure there is no need to have two separate identical files,
just to enable the server to respond to two different names.
You can put multiple names on the server_name
line:
server_name snowflake-broker.torproject.net snowflake-broker.freehaven.net;
certbot --nginx
will cope with this just fine, creating a certificate file with multiple names in SAN.
Unifying the configuration into a single file would save you from having to partition parts of the configuration into separate *.conf files (which I presume was intended to reduce duplication in the mostly identical files).
include sites-available/https/*.rconf;
include sites-available/https/*.conf;
Then you could use the sites-available/ and sites-enabled/ directories in the intended way: sites-available/ contains complete configuration files (and not subdirectories), and sites-enabled/ contains symlinks into sites-available/. Putting auxiliary *.conf files in sites-available/ seems unorthodox to me.
By the way, what is *.rconf supposed to be? There are no files whose name matches *.rconf, only broker.conf, nattypetest.conf, prometheus-node-exporter.conf.
/cc @shelikhoo