Apache2 does not restart

Discussion in 'Installation/Configuration' started by mymmo73, Dec 27, 2020.

  1. mymmo73

    mymmo73 Member

    I don't know how to do it, I ask you for some patience, could you explain me how to restore? should i just delete the bak files?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    means copy the .bak files to the original files.
     
  3. mymmo73

    mymmo73 Member

    if I understand correctly I have to do the following procedure: open the ispserver.key-201226233709.bak file copy the content and paste it in the ispserver.key file then delete ispserver.key-201226233709.bak consequently do the same thing with the other file bak?
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Well, maybe it can be done that way, but command cp would be easier.
    Code:
    cp ispserver.key-201226233709.bak  ispserver.key
    How did you manage the make those .bak files?
     
  5. mymmo73

    mymmo73 Member

  6. mymmo73

    mymmo73 Member

    I tried to perform the procedure you indicated but it does not make me restore the files maybe I'm wrong in something
    Code:
    root@server:/usr/local/ispconfig/interface/ssl# ls
    empty.dir      ispserver.crt-201226233658.bak  ispserver.key                   ispserver.key.secure
    ispserver.crt  ispserver.csr                   ispserver.key-201226233709.bak
    root@server:/usr/local/ispconfig/interface/ssl# cp ispserver.key-201226233709.bak  ispserver.key
    cp: cannot stat 'ispserver.key-201226233709.bak': No such file or directory
    root@server:/usr/local/ispconfig/interface/ssl# cp ispserver.crt-201226233658.bak  ispserver.crt
    cp: cannot stat 'ispserver.crt-201226233658.bak': No such file or directory
    root@server:/usr/local/ispconfig/interface/ssl#
    
     
  7. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Try the same commands but change to that directory first ('cd /usr/local/ispconfig/interface/ssl').
     
  8. mymmo73

    mymmo73 Member

    if you notice in post 26 that's just what I did ..
     
  9. mymmo73

    mymmo73 Member

  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is there a difference between those two alternatives? I mean, if you uninstall ISPConfig, the installing is redoing that perfect server guide.
    Anyway, I believe the cp command fails because there are invisible characters in the filename you copypasted. Notice the two spaces after the filename. Try writing the filename yourself.
     
  11. mymmo73

    mymmo73 Member

    I wrote manually but nothing changes:(
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Then try this to see if the filenames in that directory have invisible characters:
    Code:
    ls -lh *.bak | od -c
    You do not need to paste the output here, just check yourself if filenames have extra characters. If they have, you can use wildcards when copying them to avoid needing to type those maybe strange characters.
     
  13. mymmo73

    mymmo73 Member

    I paste anyway because I would like your confirmation that it seems that there are no extra characters
    Code:
    root@server:/usr/local/ispconfig/interface/ssl# ls -lh *.bak | od -c
    0000000   l   r   w   x   r   w   x   r   w   x       1       r   o   o
    0000020   t       r   o   o   t       5   8       D   e   c       2   6
    0000040       1   9   :   4   4       i   s   p   s   e   r   v   e   r
    0000060   .   c   r   t   -   2   0   1   2   2   6   2   3   3   6   5
    0000100   8   .   b   a   k       -   >       /   e   t   c   /   l   e
    0000120   t   s   e   n   c   r   y   p   t   /   l   i   v   e   /   s
    0000140   e   r   v   e   r   .   t   r   a   d   i   n   g   f   o   r
    0000160   u   m   .   i   t   /   f   u   l   l   c   h   a   i   n   .
    0000200   p   e   m  \n   l   r   w   x   r   w   x   r   w   x       1
    0000220       r   o   o   t       r   o   o   t       5   6       D   e
    0000240   c       2   6       1   9   :   4   4       i   s   p   s   e
    0000260   r   v   e   r   .   k   e   y   -   2   0   1   2   2   6   2
    0000300   3   3   7   0   9   .   b   a   k       -   >       /   e   t
    0000320   c   /   l   e   t   s   e   n   c   r   y   p   t   /   l   i
    0000340   v   e   /   s   e   r   v   e   r   .   t   r   a   d   i   n
    0000360   g   f   o   r   u   m   .   i   t   /   p   r   i   v   k   e
    0000400   y   .   p   e   m  \n
    0000406
    root@server:/usr/local/ispconfig/interface/ssl#
    
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Show
    Code:
    ls -lh *.bak
    Looks like the files are symbolic links to somewhere else.
    Do the files they point to exist?
     
  15. mymmo73

    mymmo73 Member

    you mean this?
    Code:
    root@server:~# ls -lh /usr/local/ispconfig/interface/ssl/ispserver.*
    lrwxrwxrwx 1 root root   58 Dec 26 23:39 /usr/local/ispconfig/interface/ssl/ispserver.crt -> /etc/letsencrypt/live/server.tradingforum.it/fullchain.pem
    lrwxrwxrwx 1 root root   58 Dec 26 19:44 /usr/local/ispconfig/interface/ssl/ispserver.crt-201226233658.bak -> /etc/letsencrypt/live/server.tradingforum.it/fullchain.pem
    -rwxr-x--- 1 root root 1.8K Dec 26 18:26 /usr/local/ispconfig/interface/ssl/ispserver.csr
    lrwxrwxrwx 1 root root   56 Dec 26 23:39 /usr/local/ispconfig/interface/ssl/ispserver.key -> /etc/letsencrypt/live/server.tradingforum.it/privkey.pem
    lrwxrwxrwx 1 root root   56 Dec 26 19:44 /usr/local/ispconfig/interface/ssl/ispserver.key-201226233709.bak -> /etc/letsencrypt/live/server.tradingforum.it/privkey.pem
    -rwxr-x--- 1 root root 3.3K Dec 26 18:20 /usr/local/ispconfig/interface/ssl/ispserver.key.secure
     
  16. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Your backup files are messed up aswell. Do a ISPConfig update and let it generate a new SSL cert:
    Code:
    ispconfig_update.sh --force
     
  17. mymmo73

    mymmo73 Member

  18. mymmo73

    mymmo73 Member

    now I find myself with these files I delete the back right?
    Code:
    root@server:/usr/local/ispconfig/interface/ssl# ls
    empty.dir                       ispserver.key
    ispserver.crt                   ispserver.key-201226233709.bak
    ispserver.crt-201226233658.bak  ispserver.key.secure
    ispserver.csr
    root@server:/usr/local/ispconfig/interface/ssl#
    
     
  19. mymmo73

    mymmo73 Member

    Th0m likes this.

Share This Page