CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • HTTPS is not set up on this machine
Pages: [1]

Author Topic: HTTPS is not set up on this machine  (Read 1093 times)

pswartz

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.x
  • MySQL version: 5.1.46
  • PHP version: 5.3.3
HTTPS is not set up on this machine
September 06, 2010, 12:21:03 pm
Hi, I am in the process of moving my site to a new server and have ran into a few issues.  I followed several of the migrations discussions to get me started, but now with the SSL integration I am getting the "HTTPS is not set up on this machine" error, which I believe is causing other issues.

I'm using Drupal 6.19, CiviCRM 3.2.2, PHP Version 5.3.2.  I am also using the Securepages module to support the use of SSL on my Ubercart products page (which is working).

I read some of the older forums about commenting lines out of the System.php file that does the SSL checks, but when I tried commenting the lines (868 -878), the whole site goes blank... even using a different browser pointed to the home page. I am not a coder, so probably commented out the wrong lines...

My SSL cert is only for my FQDN, and not the base domain, so is there a way we can only verify the SSL at the FQDN instead at the domain level?  I'm sure that is/has been a discussion for other threads, I just need to get my site moved and back up fully functional, so any help would be greatly appreciated.

Patrick

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: HTTPS is not set up on this machine
September 06, 2010, 01:49:13 pm

can u disable secure pages and check and see if it works. i suspect its interferring with civicrm

i think u can tell the SP module to ignore certain paths, so ignore /civicrm/*

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

pswartz

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.x
  • MySQL version: 5.1.46
  • PHP version: 5.3.3
Re: HTTPS is not set up on this machine
September 06, 2010, 02:02:51 pm
I had tried several things which included disabling SP, but Civi still complained about my site not being setup for HTTPS. 
I did find a work-around... I have included the civicrm paths to SP , and disabled "Force SSL" in CiviCRM.  Things seem to work, but still testing. Would rather have the "Force SSL" set, so will keep testing.
Thanks,
Patrick

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: HTTPS is not set up on this machine
September 18, 2010, 03:30:43 am
I don't know whether my experience is related, but it sounds similar.

Configuration: Drupal 6.19, CiviCRM v3.2.1, secure pages 6.x-1.8 (set to ignore "civicrm*"), secure pages hijack prevention 6.x-1.5, and a self-signed SSL certificate

On a test machine, if I visit a contribution page as an anonymous user, the behaviour is OK (switch from http to https). However, if I repeat as an authenticated user (with access to civicrm permissions) I get the 'HTTPS not set up on this machine' message, and the scheme remains as http.

I think the 'HTTPS not set up' message may be due to the self-signed SSL certificate (as I can tell my browser to ignore the certificate verification issue, but I can't tell CiviCRM on the server to ignore that error) [Is this a sane assumption?]

I'm nervous that the problem won't go away when I migrate my production environment to Drupal (it's currently Joomla),

Ken

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: HTTPS is not set up on this machine
October 15, 2010, 11:03:27 pm

Warning - see my update posted on 2010-10-16, below.

Patrick,

Just an update. In order to avoid the "HTTPS is not set up on this machine" error, I made the following change to CRM/Utils/System.php

Code: [Select]
--- /data/Download/CiviCRM/civicrm-3.2.3-drupal/./CRM/Utils/System.php    2010-09-06 22:15:10.000000000 +1000
+++ /data/Work/IT/CiviCRM/Local/3.2.3/overwrite/./CRM/Utils/System.php    2010-10-16 16:23:30.760791418 +1100
@@ -866,16 +866,6 @@
                strtolower( $req_headers['X_FORWARDED_PROTO'] ) != 'https' ) {
             // ensure that SSL is enabled on a civicrm url (for cookie reasons etc)
             $url = "https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
-            if ( ! self::checkURL( $url, true ) ) {
-                if ( $abort ) {
-                    CRM_Core_Error::fatal( 'HTTPS is not set up on this machine' );
-                } else {
-                    CRM_Core_Session::setStatus( 'HTTPS is not set up on this machine' );
-                    // admin should be the only one following this
-                    // since we dont want the user stuck in a bad place
-                    return;
-                }
-            }
             CRM_Utils_System::redirect( $url );
         }
     }

Notes:

  • This diff file is for v3.2.3 but should be similar for other versions
  • I think the problem I am having is due to an interaction between CiviCRM and the Secure Pages Anti-Hijack modules. I suspect that the anti-hijack module looks for a cookie variable that self::checkURL doesn't pass, but which CRM_Utils_System::redirect does. I hope to prove that soon. This patch is a temporary hack until that time.

Ken
« Last Edit: October 16, 2010, 10:07:09 pm by ken »

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: HTTPS is not set up on this machine
October 16, 2010, 10:05:24 pm
Another update: for anyone seeking to follow my lead, you might want to think twice. All of a sudden, my URL aliases stopped working. Firefox started complaining that the redirects were failing (looking at the apache logs, "/donate" (for example) was redirecting (302) to itself repeatedly).

As indicated in the previous post, I wasn't entirely happy with the solution. My work around is now...

  • In CiviCRM, set "Force SSL" to "No"
  • In Secure Pages, set all URLs like "civicrm*" to be secure (HTTPS)
  • It's unfortunate that Event Info pages and Profile pages are made secure, but it works

Ken

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • HTTPS is not set up on this machine

This forum was archived on 2017-11-26.