Set correct Nginx server root on FreeBSD and Darwin
diff --git a/certbot-nginx/certbot_nginx/constants.py b/certbot-nginx/certbot_nginx/constants.py
index 3f263fea3f5..dfc45120251 100644
--- a/certbot-nginx/certbot_nginx/constants.py
+++ b/certbot-nginx/certbot_nginx/constants.py
@@ -1,9 +1,14 @@
 """nginx plugin constants."""
 import pkg_resources
+import platform
 
+if platform.system() in ('FreeBSD', 'Darwin'):
+    server_root_tmp = "/usr/local/etc/nginx"
+else:
+    server_root_tmp = "/etc/nginx"
 
 CLI_DEFAULTS = dict(
-    server_root="/etc/nginx",
+    server_root=server_root_tmp,
     ctl="nginx",
 )
 """CLI defaults."""

Fork of #5862.

This patch should be merged not squashed to preserve authorship.