Setup Lets Encrypt for ISPConfig

Discussion in 'Installation/Configuration' started by Poliman, Jun 27, 2017.

  1. Poliman

    Poliman Member

    I setup domain for ISP panel. After put in web browser ex1.domain.com:8080 I have nicely show panel. I added LE for this domain but for ex1.domain.com:8080 I haven't LE certificate. I would like to fix it.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. Poliman

    Poliman Member

    Thanks Till for quick answer. ;) Problem is that I can't change server hostname. I bought domain and in dns section in registrar webpanel I setp A record which indicate for IP of my server (and it perfectly works, ISP panel is visible under ex1.domain.com:8080). For this domain I have done LE setup but in point 6 ahrasis's tutorial I can't do something like with hostname -f command:
    Code:
    ln -s /etc/letsencrypt/live/`hostname -f`/fullchain.pem /usr/local/ispconfig/interface/ssl/ispserver.crt
    ln -s /etc/letsencrypt/live/`hostname -f`/privkey.pem /usr/local/ispconfig/interface/ssl/ispserver.key
    
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I did not say that you shall change the hostname. Which result do you get for the command:

    hostname -f
     
  5. Poliman

    Poliman Member

    I mean hostname -f return "serwer-1.localdomain", which is provided by ovh.com but domain deployed is different, which depends from me. ;)
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you should fix the server hostname. The server hostname has to be setu during initial installation as most providers assign just a temporary name during image install of a server. The hostname is important, not just for ssl, as other servers and software that communicate with your server might get it in the responses and they expect that it can be resolved in dns. The file:

    /etc/hostname

    should contain "ex1" without the quotes. then look int the file /etc/hosts, it should contain a line:

    1.2.3.4 ex1.domain.com ex1

    where 1.2.3.4 is the IP address of your server. If there is already a line with the server IP, then replace that line.
     
    Poliman likes this.
  7. Poliman

    Poliman Member

    In /etc/hosts I have:
    Code:
    127.0.0.1       localhost
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost   ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
    127.0.1.1       serwer-1.localdomain    serwer-1
    127.0.1.1       serwer-1        serwer-1
    
    Should the last two lines be edited to below?
    new.ip.address ex1.domain.com ex1
    new.ip.address ex1 ex1

    PS
    Btw after creating website ex1.domain.com under ISP and setup LE for it I have in path /etc/letsencrypt/live/ex1.domain.com and inside it are certificate files.
     
  8. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I think you should change this 127.0.0.1 localhost to 127.0.0.1 ex1.domain.com ex1. At least while I was testing AWS, it works like that for changing hostname.
     
  9. Poliman

    Poliman Member

    I have done what you guys said. Panel works perfect under domain, with LE https. Brilliant.
     
    ahrasis likes this.

Share This Page