I installed a Matomo installation 3.9.1 on two servers, both running CentOS 7 with nginx and php 7.2.10.
If setting the setting multi_server_environment=1 in config.ini.php I would expect that I can not install plugins and change configurations from the web interface, according to https://matomo.org/faq/new-to-piwik/faq_134/
this setting lets Matomo know you’re using multiple servers and for example it will then not allow the installation of a plugin via the UI (or the plugin would be only installed on one server), or it will not allow config file changes from the UI (as the config file would be updated on one server only).
The installation of plugins is not permitted. However, I can still change configurations from the web interface, for example "System" -> "General settings" -> "Trusted Matomo Hostname" which results in inconsistent configurations on the servers:
$server1: cat config.ini.php ... [General] multi_server_environment = 1 trusted_hosts = "f1-stats.de" trusted_hosts = "f2-stats.de" trusted_hosts = "stats.de" trusted_hosts = "test.example.com" ... $server1: md5sum config.ini.php 9721fb51375b215f1587148a7b0752bf config.ini.php
$server2: cat config.ini.php ... [General] multi_server_environment = 1 trusted_hosts = "f1-stats.de" trusted_hosts = "f2-stats.de" trusted_hosts = "stats.de" ... $server2: md5sum config.ini.php 4d655c14bd8493ac1f2d592d98c92d71 config.ini.php
"Diagnostic" -> "Config file" also shows, that multi_server_environment is set to 1.
Cheers 👍 Makes sense. You can workaround by setting
[General] enable_general_settings_admin = 0.
; By setting this option to 0, the following settings will be hidden and disabled from being set in the UI:
; - Archiving settings
; - Update settings
; - Email server settings
; - Trusted Matomo Hostname
which also hides other settings that may write to the config (email settings AFAIK)