I'm trying to install Zabbix on Ubuntu Server 16.
I've followed all the instructions here:
https://www.zabbix.com/download?zabbix=3.4&os_distribution=ubuntu&os_version=xenial&db=PostgreSQL
but, I'm not able to find the apache configuration for zabbit, as described in the last point, in order to set the right date.timezone. Infact I'm able to run http://my_ip/zabbix web interface, but on the second step, Check of pre-requisites, I get the following error: Time zone for PHP is not set (configuration parameter "date.timezone"). Is the only fail in the pre-requisites.
The file /etc/httpd/conf.d/zabbix.conf doesn't exist and I don't know how to set the following
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
# php_value date.timezone Europe/Riga
in the apache2.conf
Any suggestion on how and where to set the above value?
I had the same issue on Ubuntu 14.04.4 and I have the set the values in
/etc/php5/apache2/php.ini
as below.You can also edit
/etc/apache2/conf-enabled/zabbix.conf
which is simlink to/etc/zabbix/apache.conf
:I would assume you would need to create the file with an editor ...
(you also use
nano
or another editor) and then insert the options you listed. After the empty file is show type an "i" to insert new lines and then copy/paste below settings. And thenesc
, w, q to exit edit mode, save (w) and quit (q):It seems file paths tend to change a lot over the years, and documentation doesn't stay up-to-date. Even the currently accepted answer here doesn't seem to be right anymore (though I'm on Ubuntu 18.04 now).
Today, the file you need to edit is
/etc/apache2/conf-available/zabbix-frontend-php.conf
. And the install instructions don't mention this, but you'll need to create a symlink to theconf-enabled
directory, like so:Also, nowadays there are two identical lines in this file that you need to uncomment and edit. Don't just edit the first one you see.
Current install of Zabbix 5.0.1 on Ubuntu 20.04. The paths and files have changed.
Edit the /etc/zabbix/apache.conf and make sure you uncomment both instances of the php_value date.timezone variable.