Skip to content

Instantly share code, notes, and snippets.

@xurizaemon
Created March 9, 2014 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xurizaemon/9445504 to your computer and use it in GitHub Desktop.
Save xurizaemon/9445504 to your computer and use it in GitHub Desktop.
listen, you're unique
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 _;
@xurizaemon
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment