Dear Forum Members,
I have struggled a lot to make it worked but at the end I found a solution that suited my environment.
I 'ld like to share my findings hoping to be helpful for someone in trouble.
Before editing the files, place CA domain certificate as of CRT extension and master key file as of KEY extension to the appropriate directory.
1-) First, Let's nano the apache.conf in /etc/zabbix directory.
i-) Comment out the below lines ;
#<IfModule mod_alias.c>
# Alias /zabbix /usr/share/zabbix
#</IfModule>
i-) Add in below lines under "VirtualHost";
<VirtualHost *:80>
......
ServerName zabbix.myzabbixdomain.com.tr
DocumentRoot /usr/share/zabbix/
Redirect 301 / https://zabbix.myzabbixdomain.com.tr
------
</VirtualHost>
2-) Then, Let's nano the "000-default.conf" in /etc/apache2/sites-enabled.
i-) Add in below lines under "VirtualHost" ;
<VirtualHost *:80>
.....
ServerName zabbix.myzabbixdomain.com.tr
DocumentRoot /usr/share/zabbix
Redirect permanent / https://zabbix.myzabbixdomain.com.tr
.....
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
.....
ServerName zabbix.myzabbixdomain.com.tr
DocumentRoot /usr/share/zabbix/
SSLEngine on
SSLCertificateFile /etc/zabbix/grafana.crt
SSLCertificateKeyFile /etc/zabbix/grafana.key
......
# <VirtualHost _default_:443>
</VirtualHost>
#<IfModule mod_ssl.c>
</IfModule>
2-) Then, Let's nano the "default-ssl.conf" in /etc/apache2/sites-enabled.
i-) Add in below lines under "VirtualHost" ;
<VirtualHost _default_:443>
....
ServerName zabbix.myzabbixdomain.com.tr
DocumentRoot /usr/share/zabbix
SSLEngine on
....
</VirtualHost>
3-) Check that you have not made syntax errors in the Apache configuration files:
$ sudo apache2ctl configtest
Restart Apache2 service by the command "sudo service apache2 restart"
Then, when you type in the zabbix.myzabbixdomain.com.tr to URL field, the response will be https://zabbix.myzabbixdomain.com.tr with a valid CA certificate sign left to the URL.
Regards.
Nuri.
I have struggled a lot to make it worked but at the end I found a solution that suited my environment.
I 'ld like to share my findings hoping to be helpful for someone in trouble.
Before editing the files, place CA domain certificate as of CRT extension and master key file as of KEY extension to the appropriate directory.
1-) First, Let's nano the apache.conf in /etc/zabbix directory.
i-) Comment out the below lines ;
#<IfModule mod_alias.c>
# Alias /zabbix /usr/share/zabbix
#</IfModule>
i-) Add in below lines under "VirtualHost";
<VirtualHost *:80>
......
ServerName zabbix.myzabbixdomain.com.tr
DocumentRoot /usr/share/zabbix/
Redirect 301 / https://zabbix.myzabbixdomain.com.tr
------
</VirtualHost>
2-) Then, Let's nano the "000-default.conf" in /etc/apache2/sites-enabled.
i-) Add in below lines under "VirtualHost" ;
<VirtualHost *:80>
.....
ServerName zabbix.myzabbixdomain.com.tr
DocumentRoot /usr/share/zabbix
Redirect permanent / https://zabbix.myzabbixdomain.com.tr
.....
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
.....
ServerName zabbix.myzabbixdomain.com.tr
DocumentRoot /usr/share/zabbix/
SSLEngine on
SSLCertificateFile /etc/zabbix/grafana.crt
SSLCertificateKeyFile /etc/zabbix/grafana.key
......
# <VirtualHost _default_:443>
</VirtualHost>
#<IfModule mod_ssl.c>
</IfModule>
2-) Then, Let's nano the "default-ssl.conf" in /etc/apache2/sites-enabled.
i-) Add in below lines under "VirtualHost" ;
<VirtualHost _default_:443>
....
ServerName zabbix.myzabbixdomain.com.tr
DocumentRoot /usr/share/zabbix
SSLEngine on
....
</VirtualHost>
3-) Check that you have not made syntax errors in the Apache configuration files:
$ sudo apache2ctl configtest
Restart Apache2 service by the command "sudo service apache2 restart"
Then, when you type in the zabbix.myzabbixdomain.com.tr to URL field, the response will be https://zabbix.myzabbixdomain.com.tr with a valid CA certificate sign left to the URL.
Regards.
Nuri.
Comment