Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Time Lag for Force HTTPS Redirect to Take Effect?

Discussion in 'Security' started by linux4me2, Jun 2, 2019.

  1. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    229
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I've been testing WHM 80's Force HTTPS Redirect, and it seems like there is a time lag before it takes effect, though it does seem to work eventually. The time lag makes me a little uneasy to roll it out to production sites in lieu of an .htaccess HTTPS redirect that they are already using.

    Is the time lag expected, and what's the cause?
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,457
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @linux4me2

    I believe you're referencing the new feature in cPanel's domains interface correct?

    I found that if you're running php-fpm the change will not take place immediately, or until PHP-FPM is restarted. I'm doing some further testing on this and I'll update with my findings as soon as possible.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    linux4me2 likes this.
  3. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    229
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Thanks, Lauren. I am referring to the new feature, and I am running PHP-FPM, so that may very well be the cause.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,457
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @linux4me2


    Are you by chance running anything litespeed related or php-fpm?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    229
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    It looks like our posts crossed. Yes, I am running PHP-FPM, but not Litespeed.
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,457
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Sorry I didn't see your response before I responded again. I was looking at a case for this but I believe I've ruled it out as you're not running LSAPI. One thing I did notice on systems without FPM was that if the taskqueue was busy or there are a lot of domains (as it runs update_users_vhosts) there could be a delay between submission and the actual execution of the apache restart.

    I'd suggest opening a ticket, I believe there may be a new related case here or at the very least some configuration issue causing the delay with PHP-FPM. Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    linux4me2 likes this.
  7. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    229
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I'd like to, but I'm using leased cPanel/WHM, so I'd have to go through my host, and that doesn't work too well. I just tried another account using WordPress, and there was no delay. I've got a few more to try, and I'll experiment by restarting PHP-FPM if there is lag for one of them.
     
    cPanelLauren likes this.
  8. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,457
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @linux4me2

    If you have a cPanel license and root access to the server even if it's through a provider you can still open a ticket with us if necessary or your provider doesn't provide support (they should provide it but I understand that's not always as efficient)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    229
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I did not know that. I never got past the warning that I needed to go through my hosting provider. That's good to know. Let me try a few more accounts to see if I'm still experiencing the lag. If I do, I'll submit a support ticket.
     
    cPanelLauren likes this.
  10. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,457
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Awesome, let us know how it goes.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    229
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I just upgraded five WordPress sites to SSL, and only one of the five showed any delay with the HTTPS redirect. I restarted PHP-FPM and it made no difference. Then, I restarted Apache, and it didn't make any difference, but within a few minutes, the redirect began working. So I would say PHP-FPM and Apache are not the cause. I am using WP Super Cache on the sites, and tried clearing the cache, too, but that made no difference. I'm not using any server-level caching or Cloudflare.

    My original post here was prompted by seeing the delay in redirect taking effect on three plain HTML sites, which, unlike WordPress, don't include their own redirect, which WordPress does when the Site and Home URLs are set in WordPress to HTTPS. So, I went back to one of the plain HTML sites, which has no caching whatsoever, and disabled the HTTPS redirect, then tried to browse to the site using HTTP, and I was still redirected to HTTPS. I restarted PHP-FPM, and was still redirected to HTTPS with the redirect disabled. Next, I tried a virgin browser that had not visited the site since I enabled SSL, and tried to pull up the site using HTTP. I still got redirected HTTPS, so I don't think it's the browser.

    I'm going to think about this and see if I can come up with a reason the delay occurs, but I don't think it's worth a support ticket. It's not a big deal; the redirect worked immediately 80% of the time with WordPress sites, and even when it didn't work immediately, it began working after just a few minutes. I will probably never need to use the feature again once it's enabled. I'll just remember that it takes a few minutes to work. I only posted because I was curious about it, and thought it might be inherent in how the redirect is done.

    I'm going to use the HTTPS redirect on my sites that have been using an .htaccess HTTPS redirect; I'll just wait a little while before removing the redirect from my .htaccess.
     
    cPanelLauren likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice