I am migrating my Drupal 7 instance to a new server running php 5.6 and Drupal 7.39 and Debian 8. I cannot get it to pass the clean url test. I belive clean urls do in fact work. If I call a "clean" path it loads just fine. However if I force clean urls on with Drush no users can log in.

mod_rewrite is enabled, and a call to "https://test.cgps.org/?q=/admin/config/search/clean-urls/check" returns {"status":true}. It appears to be failing when the clean url check calls drupal_http_request() to get this test page. That function returns "Error opening socket ssl://test.cgps.org:443". When I call openssl directly it connects but appears unhappy with my certificate chain.

root@drupal7 drupal7/includes# openssl s_client -connect test.cgps.org:443
Verify return code: 21 (unable to verify the first certificate)

Same with curl

curl https://test.cgps.org/?q=/admin/config/search/clean-urls/check
curl: (60) SSL certificate problem: unable to get local issuer certificate

My certificate is issued by GeoTrust and loads just fine in a browser: enter image description here

drupal_http_request() calls stream_socket_client(). Does this use openssl, curl or something else?

So I figured I needed to install the intermediate cert into Linux which I did by placing the same intermediate cert Apache uses into /usr/local/share/ca-certificates and running update-ca-certificates. Still no luck...

conf file:

<Directory /media/www_drive/drupal7>
Require all granted

RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^ index.php [L]
  • Check this post http://drupal.stackexchange.com/questions/54563/how-can-i-enable-clean-urls... this should resolve it. If not, please add to your question the snippet of your apache config file showing the mod_rewrite rules Oct 13, 2015 at 20:58
  • 1
    Last month we had a struggle with GeoTrust, too. Installing it's certificates in Ubuntu Server was unpleasant experience. By the way - it had nothing to do with Drupal. Like, at all. There was no Drupal on our server. So I don't think yours is really a Drupal question.
    – Mołot
    Oct 13, 2015 at 20:59
  • Molot, what in the end did you do to make it work?
    – AdamG
    Oct 13, 2015 at 21:18
  • longboardnode, doesnt the fact that I can reach clean urls and the fact that test.cgps.org/?q=/admin/config/search/clean-urls/check returns {"status":true} definitively indicate clean urls do work? It looks to me like the built in checker just cant load that page to get the true response. See /modules/system/system.admin.inc line 2248.
    – AdamG
    Oct 13, 2015 at 21:23
  • @AdamG Yes I see your point. However, I've had a similar experience where the rewrites in htaccess and config files were in conflict and that threw a wrench in clean urls. FWIW, what I ended up doing to fix was start with vanila install and go through the manual step by step and then it worked... not sure if it will help in your case. Oct 14, 2015 at 0:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.