• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Forcing HTTPS results in to many redirects

Daniël1234

New Pleskian
Hello all,

I've been fiddling with Plesk to get HTTPS to work for http://glasvezeldewolden.nl/
Unfortunately I haven't had any successes at forcing HTTPS, all result in a 'to many redirects' message.

The certificate is already activated and can be verified trough; https://www.ssllabs.com/ssltest/analyze.html?d=glasvezeldewolden.nl

I've been unable able to find any obvious cause for this, or obvious in the way i could find another lead to fixing it.
Neither have i been able to find anything related on either Google or the help pages of Plesk that helped me troubleshoot this issue so i hope anyone is willing to help me trough.

If you need any other/further information, please let me know.

Code:
proxy_error_log:2015/05/16 16:35:00 [crit] 21266#0: *2336 SSL_do_handshake() failed (SSL: error:140A1175:SSL routines:SSL_BYTES_TO_CIPHER_LIST:inappropriate fallback) while SSL handshaking, client: 64.41.200.106, server: 151.80.117.38:443
proxy_error_log:2015/05/16 16:36:37 [crit] 21266#0: *2616 SSL_do_handshake() failed (SSL: error:14094085:SSL routines:SSL3_READ_BYTES:ccs received early) while SSL handshaking, client: 64.41.200.106, server: 151.80.117.38:443
proxy_error_log:2015/05/16 16:36:37 [crit] 21266#0: *2617 SSL_do_handshake() failed (SSL: error:14094085:SSL routines:SSL3_READ_BYTES:ccs received early) while SSL handshaking, client: 64.41.200.106, server: 151.80.117.38:443

Code:
proxy_access_ssl_log:64.41.200.106 - - [16/May/2015:16:34:54 +0200] "GET /?SSL_Labs_Renegotiation_Test=User_Agent_May_Not_Show HTTP/1.0" 400 0 "-" "SSL Labs (https://www.ssllabs.com/about/assessment.html)"
proxy_access_ssl_log:64.41.200.106 - - [16/May/2015:16:34:55 +0200] "GET /?SSL_Labs_Renegotiation_Test=User_Agent_May_Not_Show HTTP/1.0" 400 0 "-" "SSL Labs (https://www.ssllabs.com/about/assessment.html)"
 
Hi Daniël1234,
you haven't said how you have implemented "forcing HTTPS", but have you tried...

Code:
Plesk -> Domains -> glasvezeldewolden.nl -> Websites & Domains -> Web Server Settings -> Additional directives for HTTP
and add the standard Apache redirect
Code:
Redirect 301 / https://glasvezeldewolden.nl/
I hope it helps
Kind regards

Lloyd
 
Hello Lloyd_mcse,

Thanks for your reply, though I have tried:
Unfortunately I haven't had any successes at forcing HTTPS, all result in a 'to many redirects' message.

Your suggestion:
Code:
Redirect 301 / https://glasvezeldewolden.nl/

Also results in this message, this is the Dutch message being displayed:
q7jdohzpyks.jpg
 
Hello Lloyd,

As it is a live website i can't keep the redirect line active.
Code:
Redirect 301 / https://glasvezeldewolden.nl/

But if i do add that, an loop is created from HTTPS to HTTP and back to HTTPS, back to HTTP and HTTPS and so on... which results in the "to many redirects" message.

Though I do not use any other redirects in either Plesk or the .htaccess file, so my guess is that Plesk is somewhere causing this?
 
Last edited:
Though I do not use any other redirects in either Plesk or the .htaccess file, so my guess is that Plesk is somewhere causing this?

Not that I can think of.

You may want to rebuild the domain with...
Code:
/usr/local/psa/admin/bin/httpdmng --reconfigure-domain glasvezeldewolden.nl

And then try and add the directive again.
Other than that maybe someone else has some ideas...

Sorry I couldn't be more help
 
Thanks for your reply, unfortunately rebuilding and then adding the redirect didn't bring any changes.
No problem at all, at least you've tried to help. Which is much appreciated.
 
Hi Daniël1234,

you use NGINX at the moment for your mentioned domain and configure a redirect over apache, to use HTTPS.

The correct way to redirect to HTTPS would be to add this example into the additional NGINX directives:
Code:
      server_name .example-domain.com;
      return 301 https://$host$request_uri;
 
Thank you for your quick reply UFHH01, although after adding the altered content to the NGINX directive it results in the same 'to many redirects' message, something is forcing HTTP which creates an endless loop when trying to force HTTPS manually.

Code:
server_name .glasvezeldewolden.nl;
return 301 https://$host$request_uri;
 
Hi Daniël1234,

let's try something new then:

Please remove all additional rewrite rules for apache and nginx. Afterwards, please rebuild your configuration files again with the command:
Code:
/usr/local/psa/admin/bin/httpdmng --reconfigure-domain glasvezeldewolden.nl

Disable the "SSL - support" at the domain - specific hosting - settings ( Plesk will now again rebuilds the config files ) and re-enable it again ( Plesk will now again rebuild the configuration files ) with the correct certificate, which you can choose from the dropdown-menu at the same line. At this end, please now check, if the HTTPS - redirect works.
 
Thanks you for your reply UFHH01.
I've done what you've asked me to do, without any luck.
https://glasvezeldewolden.nl/ still goes back to http://glasvezeldewolden.nl/
The certificate itself is reachable; https://ssl-tools.net/webservers/glasvezeldewolden.nl

After even more searching I came to the realization that I've had the following bit of PHP in my code, wow I feel dumbt now.
Code:
if($_SERVER['SERVER_PORT'] != 80){
   header("HTTP/1.1 301 Moved Permanently");
   header("Location: http://glasvezeldewolden.nl");
}

Excuse me for my 'dumbness'.
 
Back
Top