[Nginx] Be more explicit with server names

master
andryyy 2021-02-13 18:21:32 +01:00
parent fee4b50b9b
commit d67dc55293
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 8 additions and 2 deletions

View File

@ -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);
}