Created
March 9, 2014 10:04
-
-
Save xurizaemon/9445504 to your computer and use it in GitHub Desktop.
listen, you're unique
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit f83fcbc2d149e3c80a7d99f9bbf81d566ca159ff | |
Author: Chris Burgess <chris@giantrobot.co.nz> | |
Date: Sun Mar 9 23:03:51 2014 +1300 | |
Do not write duplicate Listen statements. (nginx only) | |
diff --git a/http/Provision/Config/Nginx/Ssl/server_ssl.tpl.php b/http/Provision/Config/Nginx/Ssl/server_ssl.tpl.php | |
index 6e9358d..9817a36 100644 | |
--- a/http/Provision/Config/Nginx/Ssl/server_ssl.tpl.php | |
+++ b/http/Provision/Config/Nginx/Ssl/server_ssl.tpl.php | |
@@ -6,7 +6,7 @@ | |
server { | |
limit_conn gulag 32; # like mod_evasive - this allows max 32 simultaneous connections from one IP address | |
-<?php foreach ($server->ip_addresses as $ip) :?> | |
+<?php foreach (array_unique($server->ip_addresses) as $ip) :?> | |
listen <?php print $ip . ':' . $http_ssl_port; ?>; | |
<?php endforeach; ?> | |
server_name _; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's a better place to put this (which does the same for Apache) but I don't see it right now.
IDK why this Aegir install is convinced it should provision two of the same IP.