Ad Widget

Collapse

web ssl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wilp
    Junior Member
    • Oct 2016
    • 28

    #1

    web ssl

    Hi!

    I want to know how i can setup zabbix to work with https ?

    root@zabbix:/home/appliance# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 16.04.6 LTS
    Release: 16.04
    Codename: xenial

    root@zabbix:/home/appliance# dpkg -l | grep zabbix
    ii zabbix-agent 1:4.0.9-2+xenial amd64 Zabbix network monitoring solution - agent
    ii zabbix-frontend-php 1:4.0.9-2+xenial all Zabbix network monitoring solution - PHP front-end
    ii zabbix-get 1:4.0.9-2+xenial amd64 Zabbix network monitoring solution - get
    ii zabbix-java-gateway 1:4.0.9-2+xenial all Zabbix network monitoring solution - java-gateway
    ii zabbix-sender 1:4.0.9-2+xenial amd64 Zabbix network monitoring solution - sender
    ii zabbix-server-mysql 1:4.0.9-2+xenial amd64 Zabbix network monitoring solution - server (MySQL)
    root@zabbix:/home/appliance#



    This is my way:

    sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt

    chmod -R 700 /etc/ssl/private/

    appliance@zabbix:~$ sudo a2enmod ssl

    sudo service apache2 restart

    sudo a2ensite default-ssl.conf

    sudo service apache2 restart

    In this place i have a trouble



    root@zabbix:/home/appliance# sudo service apache2 status
    ● apache2.service - LSB: Apache2 web server
    Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
    Drop-In: /lib/systemd/system/apache2.service.d
    └─apache2-systemd.conf
    Active: inactive (dead) since Fri 2019-06-07 13:50:04 UTC; 1min 6s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 2351 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
    Process: 1712 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
    Process: 2334 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)

    Jun 07 13:50:04 zabbix systemd[1]: Stopped LSB: Apache2 web server.
    Jun 07 13:50:04 zabbix systemd[1]: Starting LSB: Apache2 web server...
    Jun 07 13:50:04 zabbix apache2[2334]: * Starting Apache httpd web server apache2
    Jun 07 13:50:04 zabbix apache2[2334]: Action 'start' failed.
    Jun 07 13:50:04 zabbix apache2[2334]: The Apache error log may have more information.
    Jun 07 13:50:04 zabbix apache2[2334]: *
    Jun 07 13:50:04 zabbix apache2[2351]: * Stopping Apache httpd web server apache2
    Jun 07 13:50:04 zabbix apache2[2351]: *
    Jun 07 13:50:04 zabbix systemd[1]: Started LSB: Apache2 web server.


    cat /var/log/apache2/error.log
    [Fri Jun 07 17:37:50.312849 2019] [ssl:error] [pid 3887] AH02579: Init: Private key not found
    [Fri Jun 07 17:37:50.312933 2019] [ssl:error] [pid 3887] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
    [Fri Jun 07 17:37:50.312943 2019] [ssl:error] [pid 3887] SSL Library Error: error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error
    [Fri Jun 07 17:37:50.312949 2019] [ssl:error] [pid 3887] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
    [Fri Jun 07 17:37:50.312956 2019] [ssl:error] [pid 3887] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=RSA)
    [Fri Jun 07 17:37:50.312963 2019] [ssl:error] [pid 3887] SSL Library Error: error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib
    [Fri Jun 07 17:37:50.312968 2019] [ssl:error] [pid 3887] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
    [Fri Jun 07 17:37:50.312974 2019] [ssl:error] [pid 3887] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO)
    [Fri Jun 07 17:37:50.312978 2019] [ssl:emerg] [pid 3887] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
    [Fri Jun 07 17:37:50.312980 2019] [ssl:emerg] [pid 3887] AH02564: Failed to configure encrypted (?) private key zabbix.zabbix.lan:443:0, check /etc/ssl/certs/apache-selfsigned.crt
    AH00016: Configuration Failed

    But this command is output text:
    root@zabbix:/home/appliance# sudo apache2ctl configtest
    Syntax OK

    I need help!
    Last edited by wilp; 07-06-2019, 16:45.
Working...