Krlos Posted September 11, 2019 Share Posted September 11, 2019 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 More sharing options...
Krlos Posted September 11, 2019 Author Share Posted September 11, 2019 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 More sharing options...
adrian Posted September 11, 2019 Share Posted September 11, 2019 Your mileage might be different, but I found Webfaction hosting quite slow, not to mention a very strange and overly complicated control panel ? Link to comment Share on other sites More sharing options...
Krlos Posted September 11, 2019 Author Share Posted September 11, 2019 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 More sharing options...
adrian Posted September 11, 2019 Share Posted September 11, 2019 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 More sharing options...
Krlos Posted September 11, 2019 Author Share Posted September 11, 2019 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 More sharing options...
adrian Posted September 12, 2019 Share Posted September 12, 2019 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 More sharing options...
Kiwi Chris Posted September 15, 2019 Share Posted September 15, 2019 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now