racetoni2 Posted October 1, 2015 Report Posted October 1, 2015 How can i force blesta to use SSL? Quote
1 Tyson Posted October 1, 2015 Report Posted October 1, 2015 The .htaccess file included with Blesta already contains a rule to force HTTPS, which is commented out by default. Simply remove the # symbol at the beginning of these lines # Force HTTPS #RewriteCond %{HTTPS} !=on #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L] i.e. # Force HTTPS RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L] Timothin and Michael 2 Quote
0 Blesta Addons Posted October 1, 2015 Report Posted October 1, 2015 read this http://www.blesta.com/forums/index.php?/topic/4050-forcessl-issues/ Quote
0 racetoni2 Posted October 1, 2015 Author Report Posted October 1, 2015 OK, So i try that already. I open the. htaccess file. It was blank. So i added the wholes entire lines in there and is not forcing SSL. Quote
0 Michael Posted October 1, 2015 Report Posted October 1, 2015 OK, So i try that already. I open the. htaccess file. It was blank. So i added the wholes entire lines in there and is not forcing SSL. Do you have teamviewer and I can look with you or are you using a control panel (If you use a non control panel do you have allowoveride All?) Quote
0 Michael Posted October 1, 2015 Report Posted October 1, 2015 I'm using cPanel. the htaccess should work with cPanel. Quote
0 Paul Posted October 2, 2015 Report Posted October 2, 2015 If your .htaccess was blank (in your Blesta install directory), copy the one from the Blesta zip file. Quote
0 racetoni2 Posted October 2, 2015 Author Report Posted October 2, 2015 Thats what I did and nothing. Is not forcing SSL. Quote
0 serge Posted October 2, 2015 Report Posted October 2, 2015 at your cpanel, check that Apache do have the URL rewrite module enabled Quote
0 murendie Posted October 2, 2015 Report Posted October 2, 2015 I am not using cPanel. I don't have a control panel SSL redirect not working please assist. Quote
0 serge Posted October 2, 2015 Report Posted October 2, 2015 check that Apache have mod_rewrite installed Quote
0 murendie Posted October 2, 2015 Report Posted October 2, 2015 Here is the apache config. Mod rewrite enbled: <VirtualHost my.netstreet.co.za:443> SSLEngine On SSLCertificateFile /etc/apache2/ssl/*.netstreet.co.za.crt SSLCertificateKeyFile /etc/apache2/ssl/*.netstreet.co.za.key SSLCACertificateFile /etc/apache2/ssl/geotrust.cer ServerName my.netstreet.co.za DocumentRoot "/var/www/Netstreet/my" ErrorLog ${APACHE_LOG_DIR}/error.log <Directory "/var/www/Netstreet/my"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> Quote
0 Michael Posted October 2, 2015 Report Posted October 2, 2015 Here is the apache config. Mod rewrite enbled: <VirtualHost my.netstreet.co.za:443> SSLEngine On SSLCertificateFile /etc/apache2/ssl/*.netstreet.co.za.crt SSLCertificateKeyFile /etc/apache2/ssl/*.netstreet.co.za.key SSLCACertificateFile /etc/apache2/ssl/geotrust.cer ServerName my.netstreet.co.za DocumentRoot "/var/www/Netstreet/my" ErrorLog ${APACHE_LOG_DIR}/error.log <Directory "/var/www/Netstreet/my"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> not enabled on the http.d configuration. Quote
0 murendie Posted October 8, 2015 Report Posted October 8, 2015 How do I modify this to enable it ? Quote
0 Michael Posted October 8, 2015 Report Posted October 8, 2015 How do I modify this to enable it ? You need to edit the Apache config found at: apache2.conf or in /etc/apache2/conf-available/ see: https://help.ubuntu.com/lts/serverguide/httpd.html Quote
0 racetoni2 Posted October 25, 2015 Author Report Posted October 25, 2015 I get the following error now: This webpage has a redirect loop ERR_TOO_Many _REDIRECTS Quote
0 Michael Posted October 25, 2015 Report Posted October 25, 2015 I get the following error now: This webpage has a redirect loop ERR_TOO_Many _REDIRECTS can you please paste your .htaccess code here, and are you using HTST or Mod_Spdy? Quote
0 racetoni2 Posted October 25, 2015 Author Report Posted October 25, 2015 i believe mod_spdy ######################################################## # package: minPHP # filename: .htaccess ######################################################## <Files ~ "\.(pdt)$"> order deny,allow deny from all </Files> # Protect against Clickjacking #Header append X-Frame-Options "SAMEORIGIN" RewriteEngine on # Force HTTPS #RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php RewriteCond %{REQUEST_URI} ^(.*)/install.php$ RewriteRule install.php %1/install/ [R=301,L] Quote
0 Michael Posted October 25, 2015 Report Posted October 25, 2015 I spot your error: #RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L] Should be: RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L] Quote
0 racetoni2 Posted October 25, 2015 Author Report Posted October 25, 2015 Did that already and still getting the same error Quote
0 Michael Posted October 25, 2015 Report Posted October 25, 2015 Did that already and still getting the same error ok comment them both out and try your blesta, try it with http:// see if it redirects to https:// if so you are using HTST If it fails try: RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{SERVER_PORT} ^80$ [NC] RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} If that fails try: RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com [NC] RewriteCond %{REQUEST_URI} ^/ [NC] RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L] replacing domain.com with whatever your blesta is e.g.: RewriteCond %{HTTP_HOST} ^(www\.)?licensecart\.com/billing/ [NC] RewriteCond %{REQUEST_URI} !^/dl.php [NC] RewriteCond %{REQUEST_URI} ^/ [NC] RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://licensecart.com/billing/$1 [R=301,L] If it's none of them I'm out of ideas. Quote
0 racetoni2 Posted October 25, 2015 Author Report Posted October 25, 2015 neither work.....is a mystery Quote
0 racetoni2 Posted October 25, 2015 Author Report Posted October 25, 2015 I have solve the PROBLEM>>>>>> OMG!!!!!!! Ok I took out the old code and replace it with the following: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </IfModule> Michael 1 Quote
0 Michael Posted October 25, 2015 Report Posted October 25, 2015 I have solve the PROBLEM>>>>>> OMG!!!!!!! Ok I took out the old code and replace it with the following: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </IfModule> Well done mate never heard of HTTP:X-Forwarded-Proto before. Quote
Question
racetoni2
How can i force blesta to use SSL?
33 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.