Jump to content

ERR_TOO_MANY_REDIRECTS Webfaction Webhosting


Krlos
 Share

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!

 

Link to comment
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

 

Link to comment
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?

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...