The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AutoSSL problem on some accounts

Discussion in 'Security' started by user4629, Feb 2, 2017.

Tags:
  1. user4629

    user4629 Member

    Joined:
    May 25, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Thessaloniki
    cPanel Access Level:
    Root Administrator
    Hello,
    I am running a WHM 60.0 (build 36) server with autossl enabled on all accounts.

    I have 67 accounts in the server.
    I have managed to enable https on 7 accounts with no problem adding in their corresponding htaccess file the following lines:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

    I have set a primary domain in the autossl settings.

    However, in some accounts I cannot enable ssl and I get a certification error that states that the ssl certificate has been set to another domain (my primary).

    What can be the problem?
     
  2. user4629

    user4629 Member

    Joined:
    May 25, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Thessaloniki
    cPanel Access Level:
    Root Administrator
    After some digging in the log files i see that
    The system queried for a temporary file at “<a href="mydomain/xxxxxxxxx.txt">mydomain/xxxxxxxxx.txt</a>”, but the web server responded with the following error: 404 (Not Found).

    I read in other posts that it maybe due to password protected directories.
    I removed the password protect from the directories, now are these files from comodo are going to be repopulated?
     
  3. Axell35

    Axell35 Member

    Joined:
    Nov 10, 2006
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    153
    Probably yes, we had a similar problem but we received 401 error. Removing .htpasswd and editing .htacces accordingly solved the problem for us.

    Try clicking "check <user>" after you've made the changes
     
  4. user4629

    user4629 Member

    Joined:
    May 25, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Thessaloniki
    cPanel Access Level:
    Root Administrator
    Thank you for your answer.
    I did remove all password protection from directories,
    and i run the check again:

    2:31:29 PM This system has AutoSSL set to use “cPanel (powered by Comodo)”.
    2:31:29 PM Checking websites for mydomain …
    2:31:29 PM The website “mydomain”, owned by mydomain, has no SSL certificate. AutoSSL will attempt to obtain a new certificate and install it.
    2:31:29 PM The system will attempt to renew SSL certificates for the following websites:
    2:31:29 PM mydomain (mydomain www.mydomain mail.mydomain)

    and then again the same WARN:
    failed its domain control validation: .....

    any other ideas?
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,980
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature so we can take a closer look and determine why domain validation is failing for these domain names. You can post the ticket number here and we will update this thread with the outcome.

    Thank you.
     
  6. user4629

    user4629 Member

    Joined:
    May 25, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Thessaloniki
    cPanel Access Level:
    Root Administrator
    We did through my vps technician and the answer from cpanel personnel was that the .htaccess of all the problematic accounts were "incompatible" with Auto SSL. Of cource these .htaccess files are identical to all the other accounts that got their AutoSSL certificate ok.

    What now?
     
    #6 user4629, Feb 17, 2017
    Last edited: Feb 17, 2017
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,980
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you check with your provider and ask them to provide you with the ticket number? We'd need to review the ticket to find out more information about why validation failed.

    Thank you.
     
  8. user4629

    user4629 Member

    Joined:
    May 25, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Thessaloniki
    cPanel Access Level:
    Root Administrator
    Currently using WHM 62.0 (build 15)
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,980
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm referring to the support ticket number opened with cPanel, as opposed to the cPanel version number.

    Thanks!
     
  10. user4629

    user4629 Member

    Joined:
    May 25, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Thessaloniki
    cPanel Access Level:
    Root Administrator
    The ticket number is 8230027
    Thank you.
    If you want any clarifications i have full knowledge of all the accounts in this vps and their setup (.htaccess & content)
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,980
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It looks like the issue was confirmed to relate to the .htaccess, but the specific entry resulting in the issue was not verified. Could you let us know the full contents of the .htaccess file associated with a domain name affected by this issue?

    Thank you.
     
  12. user4629

    user4629 Member

    Joined:
    May 25, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Thessaloniki
    cPanel Access Level:
    Root Administrator
    I can send you the original .htaccess and the corresponding account name, the problematic accounts is more than one.
    Where should I send it? I dont want to post such data in here.
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,980
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can send a copy of the .htaccess file using the CODE tags to me via a private message on the forums.

    Thank you.
     
    user4629 likes this.
  14. user4629

    user4629 Member

    Joined:
    May 25, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Thessaloniki
    cPanel Access Level:
    Root Administrator
    To anyone having problems with .htaccess of opencart 2+ and autoSSL the problem was in the line:

    <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">

    that became in my case in order to succesfully pass the certificate install:

    <FilesMatch "(?i)((\.tpl|\.ini|\.log))">


    The weird thing was that I had other accounts with the exact same .htaccess that had passed Autossl certification but the above edit did the trick to the problematic accounts.

    Thank you cPanelMichael !!!!
     
    cPanelMichael likes this.
Loading...

Share This Page