Jump to content
Krlos

ERR_TOO_MANY_REDIRECTS Webfaction Webhosting

Recommended Posts

Hi, I have a website hosted at webfaction and I was trying to activate SSL on this website, but now I'm having ERR_TOO_MANY_REDIRECTS error.

They have a custom panel to administer websites and from their support docs I found this code that should be placed in .httaccess, but I don't know how to integrate this with processwire .httacess

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{REQUEST_URI} !^/(.well-known)(/|$)
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

I have uncomented the lines, everything else is default processwire 3 .httaccess

# -----------------------------------------------------------------------------------------------
  # 9. If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below.
  # -----------------------------------------------------------------------------------------------
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

as I have done before and it worked perfect on Cpanel hosting.

Any ideas?

Thank you!

 

Share this post


Link to post
Share on other sites

I have progressed a little bit:

If I set "Only HTTPS" on the template using Processwire backend, the site resolves. But I have to enter manually "https://" otherwise I get an error.

If I set

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

on the .htaccess file I get an instant error.

Thank you

 

Share this post


Link to post
Share on other sites

Your mileage might be different, but I found Webfaction hosting quite slow, not to mention a very strange and overly complicated control panel 🙂

Share this post


Link to post
Share on other sites
6 hours ago, adrian said:

Your mileage might be different, but I found Webfaction hosting quite slow, not to mention a very strange and overly complicated control panel 🙂

Yes, unfortunately the owner did not want to change the webhosting.

Do you have any recommendation for a not so expensive webhosting that runs Processwire without problems?

Share this post


Link to post
Share on other sites
1 minute ago, Krlos said:

Yes, unfortunately the owner did not want to change the webhosting.

Do you have any recommendation for a not so expensive webhosting that runs Processwire without problems?

For many years I was fortunate to host all my sites on my own dedicated University servers. These days I also use unmanaged Digital Ocean VPS servers whenever I can, but obviously these are not for everyone. The one thing I steer clear of is FastCGI / nginx as an apache reverse proxy - PW always gives me errors on these setups.

Share this post


Link to post
Share on other sites
2 minutes ago, adrian said:

For many years I was fortunate to host all my sites on my own dedicated University servers. These days I also use unmanaged Digital Ocean VPS servers whenever I can, but obviously these are not for everyone. The one thing I steer clear of is FastCGI / nginx as an apache reverse proxy - PW always gives me errors on these setups.

Nice!, I have a PW website that runs rock solid on a managed VPS at Knownhost, unfortunately it is far from the budget for this website I'm tring to set up properly on Webfation.

Share this post


Link to post
Share on other sites

I have also built a site on Knownhost - it's fast enough, but I did come across the nginx reverse proxy errors quite a lot - I think I managed to tweak things such that they aren't a problem now, but still found it painful initially. Also, they are just so much more expensive than Digital Ocean, so it depends on budget vs time/skills to manage the server I guess.

Share this post


Link to post
Share on other sites

What I had to do was create two websites with webfaction, one using HTTP and one using HTTPS

Go to Domains/Websites, then Websites

In the HTTPS site, just use the standard Processwire .htaccess and make sure you've got the site set to use HTTPS.

Create another site, using static/CGI/PHP template will do with the same domain name, but make sure it is using HTTP (not HTTPS) and in that one add the code you posted to the .htaccess file of the HTTP site.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...