LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 02-03-2012, 09:12 PM   #1
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 354

Rep: Reputation: 23
Drupal 7 on CentOS 6.2 force user login to https


I have Drupal 7 installed on CentOS 6.2 (64-bit), I need the user login to force redirect to https (only for user login).

I have seen several different ways, however I am having difficulty in figuring out how to do it?
 
Old 02-04-2012, 10:36 AM   #2
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
Apache SSL config

After some annoyances with SELinux and installing mod_ssl; the Secure Pages and clean URL's seems to work pretty well.

Steps that i took:

Code:
sudo yum install mod_ssl;
In File: /etc/apache2/sites-available/default-ssl
Code:
SSLEngine on
.......
SSLCertificateFile    /etc/certs/server.crt               # path to server.crt
SSLCertificateKeyFile /etc/private/server.key             # path to server.key
.....
SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire  # This line was commented out
Create a link to the private in /etc/ssl form ../pki/tls/private
Code:
cd /etc/ssl/;
ln -s ../pki/tls/private/;
If needing to create a self signed cert (the name does not have to be server:
Code:
cd ~/;
openssl genrsa -out server.key 1024;
openssl rsa -in server.key -out server.key.insecure;
openssl req -new -key server.key -out server.csr;
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt;
Copy key and cert:
Code:
sudo  cp ~/server.crt /etc/ssl/certs/;
sudo cp ~/server.key /etc/ssl/private/;
 
Old 02-04-2012, 10:47 AM   #3
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
Drupal instructions for Secure Pages

Download Secure Pages to sites/all/modules
Extract it

In web browser login into your Drupal site (ssl should be enable if the previous thread was followed, so using https should work)
  1. Click on Modules, turn on Secure Pages by checking the box and then Save Configuration
  2. Click on Configuration and the Secure pages
  3. Enable Secure Pages again, configure the way you want (the default shoudl be sufficient) and Save Configuration

*Note this seems to turn off the overlay functionality of the admin windows.

Something else that might wanted is the Path Auto module, actually seeing words instead of node and number is helpful.

Last edited by brentaar; 02-04-2012 at 10:49 AM.
 
Old 02-04-2012, 11:44 AM   #4
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 354

Original Poster
Rep: Reputation: 23
I will give this a go, I checked and we are going to buy a certificate most likely from godaddy, less expensive.

I will check for selinux alerts as well.

thanks
again
 
Old 02-07-2012, 09:14 AM   #5
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 354

Original Poster
Rep: Reputation: 23
Have you heard of this module Secure Login from Drupal

http://drupal.org/project/securelogin

?

Can you provide the link to the Secure Pages (which module).

Last edited by rhbegin; 02-07-2012 at 09:21 AM.
 
Old 02-09-2012, 12:58 PM   #6
brentaar
LQ Newbie
 
Registered: Dec 2011
Location: Portland, OR
Distribution: Fedora 16, Ubuntu 10.04
Posts: 21
Blog Entries: 1

Rep: Reputation: Disabled
No i have not heard of that one, but it works great.

The link for Secure Pages http://drupal.org/project/securepages
Though it looks like the module is still in dev.
 
Old 02-09-2012, 04:17 PM   #7
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 354

Original Poster
Rep: Reputation: 23
Thank you a million, the redirect is working and I need to put the SSL Certificate on the server now.

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] REDHAT missing functionality - force user to change password on login machielr Linux - Security 5 03-17-2011 02:36 PM
Force use HTTPS on spectacular URL?? wegadnie Linux - Networking 2 04-09-2009 03:31 AM
Force https on a password protected directory abapdr Linux - Software 1 06-07-2004 04:35 AM
Force user login with different account rte Linux - Newbie 1 04-01-2004 09:09 AM
redhat pre 7.2 had login.def to force standard user to sign on first ForumKid Linux - General 1 08-14-2003 04:32 PM


All times are GMT -5. The time now is 04:46 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration