usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.6k stars 613 forks source link

Application Installer: wordpress with lscache complains of .well-known letsencrypt required directory #12

Closed centminmod closed 6 years ago

centminmod commented 6 years ago

For a letsencrypt ssl enabled HTTPS site in cyberpanel, you should exclude .well-known directory from the existing file check that happens when you run Application Installer for wordpress with lscache. Right now when you remove everything except .well-known directory, Application Installer complains with errorr

Installation failed. Error message: 0,Target directory should be empty before installation, otherwise data loss could occur.

public_html only has

ls -lah
total 12K
drwxr-xr-x 3 cyberpc cyberpc 4.0K Jan 30 09:36 .
drwxr-xr-x 7 cyberpc cyberpc 4.0K Jan 30 09:34 ..
drwxr-xr-x 2 root    root    4.0K Jan 30 07:19 .well-known

removing .well-known allows Application Installer to proceed, but after wordpress install, the .well-known directory is missing so letsencrypt auto renewals would fail

ls -lah            
total 196K
drwxr-xr-x  5 cyberpc cyberpc 4.0K Jan 30 09:40 .
drwxr-xr-x  7 cyberpc cyberpc 4.0K Jan 30 09:34 ..
-rw-r--r--  1 cyberpc cyberpc  418 Sep 25  2013 index.php
-rw-r--r--  1 cyberpc cyberpc  20K Jan  6 19:32 license.txt
-rw-r--r--  1 cyberpc cyberpc 7.3K Dec 12  2016 readme.html
-rw-r--r--  1 cyberpc cyberpc 5.4K Sep 23 12:21 wp-activate.php
drwxr-xr-x  9 cyberpc cyberpc 4.0K Jan 16 21:39 wp-admin
-rw-r--r--  1 cyberpc cyberpc  364 Dec 19  2015 wp-blog-header.php
-rw-r--r--  1 cyberpc cyberpc 1.6K Aug 29  2016 wp-comments-post.php
-rw-r--r--  1 cyberpc cyberpc 2.8K Jan 30 09:40 wp-config.php
drwxr-xr-x  4 cyberpc cyberpc 4.0K Jan 16 21:39 wp-content
-rw-r--r--  1 cyberpc cyberpc 3.6K Aug 20 04:37 wp-cron.php
drwxr-xr-x 18 cyberpc cyberpc  12K Jan 16 21:39 wp-includes
-rw-r--r--  1 cyberpc cyberpc 2.4K Nov 21  2016 wp-links-opml.php
-rw-r--r--  1 cyberpc cyberpc 3.3K Aug 22 11:52 wp-load.php
-rw-r--r--  1 cyberpc cyberpc  36K Oct 13 02:10 wp-login.php
-rw-r--r--  1 cyberpc cyberpc 7.9K Jan 11  2017 wp-mail.php
-rw-r--r--  1 cyberpc cyberpc  16K Oct  4 00:20 wp-settings.php
-rw-r--r--  1 cyberpc cyberpc  30K Oct 18 17:36 wp-signup.php
-rw-r--r--  1 cyberpc cyberpc 4.6K Oct 23 22:12 wp-trackback.php
-rw-r--r--  1 cyberpc cyberpc 3.0K Aug 31  2016 xmlrpc.php

suggestion:

for Application Installer routine, re-add .well-known if it's missing so auto renewals will work for letsencrypt

usmannasir commented 6 years ago

I will take care of this, thank you.

usmannasir commented 6 years ago

Patched.