Cannot get LE to work with the Panel

Discussion in 'Installation/Configuration' started by jonathannet, Oct 8, 2018.

  1. jonathannet

    jonathannet Member

    Hi
    I got the LE cert to work with the domain, and I was trying to get the LE cert to work with the control panel but I got this error:

    Code:
    [email protected]:/usr/local/ispconfig/interface/ssl# ln -s /etc/letsencrypt/live/$(hostname -f)/fullchain.pem ispserver.crt
    hostname: Name or service not known
    ln: failed to create symbolic link 'ispserver.crt': File exists
    [email protected]:/usr/local/ispconfig/interface/ssl# ln -s /etc/letsencrypt/live/$(hostname -f)/privkey.pem ispserver.key
    hostname: Name or service not known
    [email protected]:/usr/local/ispconfig/interface/ssl# ln -s /etc/letsencrypt/live/$(hostname -f)/privkey.pem ispserver.key
    hostname: Name or service not known
    ln: failed to create symbolic link 'ispserver.key': File exists
    [email protected]:/usr/local/ispconfig/interface/ssl# cat ispserver.{key,crt} > ispserver.pem
    cat: ispserver.key: No such file or directory
    cat: ispserver.crt: No such file or directory
    [email protected]:/usr/local/ispconfig/interface/ssl# chmod 600 ispserver.pem
    [email protected]:/usr/local/ispconfig/interface/ssl# service apache2 restart
    Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
    [email protected]:/usr/local/ispconfig/interface/ssl# systemctl status apache2.service
    ● 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: failed (Result: exit-code) since Mon 2018-10-08 11:56:32 CEST; 10s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 23464 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
      Process: 23492 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
    
    Oct 08 11:56:32 jnet apache2[23492]: Output of config test was:
    Oct 08 11:56:32 jnet apache2[23492]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:73
    Oct 08 11:56:32 jnet apache2[23492]: AH00526: Syntax error on line 63 of /etc/apache2/sites-enabled/000-ispconfig.vhost:
    Oct 08 11:56:32 jnet apache2[23492]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exist or is empty
    Oct 08 11:56:32 jnet apache2[23492]: Action 'configtest' failed.
    Oct 08 11:56:32 jnet apache2[23492]: The Apache error log may have more information.
    Oct 08 11:56:32 jnet systemd[1]: apache2.service: Control process exited, code=exited status=1
    Oct 08 11:56:32 jnet systemd[1]: Failed to start LSB: Apache2 web server.
    Oct 08 11:56:32 jnet systemd[1]: apache2.service: Unit entered failed state.
    Oct 08 11:56:32 jnet systemd[1]: apache2.service: Failed with result 'exit-code'.
    How do I fix that?

    Regards
    Jonathan
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There seems to be a config error with your server name. What is the result of the two commands:

    hostname

    and

    hostname -f
     
  3. jonathannet

    jonathannet Member

    Okay but now I have set the hostname, and now I get this errror:
    Code:
    [email protected]:/usr/local/ispconfig/interface/ssl# ln -s /etc/letsencrypt/live/$(hostname -f)/fullchain.pem ispserver.crt
    ln: failed to create symbolic link 'ispserver.crt': File exists
    [email protected]:/usr/local/ispconfig/interface/ssl# ln -s /etc/letsencrypt/live/$(hostname -f)/privkey.pem ispserver.key
    ln: failed to create symbolic link 'ispserver.key': File exists
    
     
  4. ahrasis

    ahrasis Well-Known Member

    Use ln -sf to force the symlink to be recreated.
     
    jonathannet likes this.
  5. jonathannet

    jonathannet Member

    Thanks, got it to work now :D
     
    ahrasis likes this.

Share This Page