Browse Source

[Nginx] Be more explicit with server names

andryyy 4 years ago
parent
commit
d67dc55293
1 changed files with 8 additions and 2 deletions
  1. 8 2
      data/web/inc/functions.xmpp.inc.php

+ 8 - 2
data/web/inc/functions.xmpp.inc.php

@@ -186,7 +186,7 @@ server {
   ssl_certificate /etc/ssl/mail/cert.pem;
   ssl_certificate_key /etc/ssl/mail/key.pem;
 
-  server_name *.%s %s;
+  server_name %s conference.%s proxy.%s pubsub.%s upload.%s;
 
   if (\$request_uri ~* "%%0A|%%0D") {
     return 403;
@@ -209,7 +209,13 @@ server {
 }
 
 EOF;
-        fwrite($site_handle, sprintf($site_config, $xmpp_domains[$domain]['xmpp_host'], $xmpp_domains[$domain]['xmpp_host']));
+        fwrite($site_handle, sprintf($site_config,
+          $xmpp_domains[$domain]['xmpp_host'],
+          $xmpp_domains[$domain]['xmpp_host'],
+          $xmpp_domains[$domain]['xmpp_host'],
+          $xmpp_domains[$domain]['xmpp_host'],
+          $xmpp_domains[$domain]['xmpp_host']
+        ));
       }
       fclose($site_handle);
     }