[Web] Remove XMPP site when disabling XMPP

master
andryyy 2021-02-14 21:33:43 +01:00
parent 9c4cb21df6
commit 666d344322
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 16 additions and 0 deletions

View File

@ -116,6 +116,14 @@
proxy_redirect off;
}
location /xmpp/ {
proxy_pass http://ejabberd:5282/xmpp/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
}
location ~* ^/Autodiscover/Autodiscover.xml {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpfpm:9002;

View File

@ -235,6 +235,14 @@ EOF;
}
fwrite($acl_handle, '# Autogenerated by mailcow' . PHP_EOL);
fclose($acl_handle);
// Write empty Nginx site
$acl_handle = fopen('/etc/nginx/conf.d/ZZZ-ejabberd.conf', 'w');
if (!$acl_handle) {
throw new Exception($lang['danger']['file_open_error']);
}
fwrite($acl_handle, '# Autogenerated by mailcow' . PHP_EOL);
fclose($acl_handle);
}
if (md5_file('/ejabberd/ejabberd_acl.yml') != $ejabberd_acl_md5) {