Ad Widget

Collapse

After certbot certificate install: zabbix site not available

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • M4rtin
    Junior Member
    • Jun 2022
    • 5

    #1

    After certbot certificate install: zabbix site not available

    Hallo, I tried to install a let's encrypt certificate to my zabbix server and - unfortunately - didn't made a backup before. Now the site is not available with http and https anymore.

    I removed certbot and default-ssl.conf


    Apache is running:

    Code:
    apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
    Active: active (running) since Mon 2023-07-03 09:25:57 UTC; 21min ago
    Docs: https://httpd.apache.org/docs/2.4/
    Process: 836 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
    Process: 2023 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
    Main PID: 909 (apache2)
    Tasks: 7 (limit: 2252)
    Memory: 30.8M
    CGroup: /system.slice/apache2.service
    ├─ 909 /usr/sbin/apache2 -k start
    ├─2076 /usr/sbin/apache2 -k start
    ├─2077 /usr/sbin/apache2 -k start
    ├─2078 /usr/sbin/apache2 -k start
    ├─2079 /usr/sbin/apache2 -k start
    ├─2080 /usr/sbin/apache2 -k start
    └─2372 /usr/sbin/apache2 -k start

    /etc/apache/site-available/myserver.conf:

    Code:
    NameVirtualHost *:80
    <VirtualHost *:80>
    DocumentRoot /usr/share/zabbix
    ServerName zabbix.xxx.net
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =zabbix.xxx.net
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    </VirtualHost>

    apache log:

    Code:
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/zabbix.xxx.net.conf:1
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using xx.xx.xx.xx. Set the 'ServerName' directive globally to suppress this message
    Syntax OK

    port 80:

    Code:
    root@zabbix:/etc/apache2/sites-available# sudo netstat -anp | grep :80
    tcp6 0 0 :::80 :::* LISTEN 909/apache2
    owner of /usr/share/zabbix is www-data:www-data

    I also tried a2dissite zabbix.conf / a2ensite zabbix.conf

    Do you know how I can get the site available again?​
Working...