The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
file transfer from https to a Unix box jvjaimes UNIX for Dummies Questions & Answers 4 07-21-2008 06:54 PM
File Upload Performance using IE from Windows to AIX via HTTPS darontan AIX 1 10-28-2005 03:04 AM
HTTPS connection unix rkumar28 UNIX for Advanced & Expert Users 2 06-24-2004 08:20 PM
out of inodes on https dev hd josramon Filesystems, Disks and Memory 4 11-12-2002 01:08 PM
apache-ssl https-problem? loitschix UNIX for Dummies Questions & Answers 1 07-23-2001 02:31 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-27-2009
kumarrana kumarrana is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 28
Implement https on apache 2.0.55

I have been trying to implement https auto-redirect for a particular links. I have three configuration file /etc/apache2/apache2.conf, /etc/apache2/sites-available/default, and /etc/apache2/sites-available/ssl. In /etc/apache2/sites-available/default file I added following script
<IfModule mod_proxy.c>
ProxyRequests Off
RewriteEngine on
# send all http to https
RewriteCond %{HTTPS} !=on
RewriteRule (.*)$ https://myhost.edu/~userna/link.php/$1 [R]
</IfModule>
But it is not working.

Can somebody tell me what am I missing?
Thanks in advance.
  #2 (permalink)  
Old 01-27-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
The Rewrite lines look OK.

Why is the Rewrite code inside the mod_proxy stuff? Are you sure mod_proxy is being loaded prior to this config line? Put it touside the <ifmodule mod_proxy.c> stuff and see what happens.
  #3 (permalink)  
Old 01-28-2009
kumarrana kumarrana is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 28
HTTPS redirect on apache

mod_proxy.c is located under directory /usr/lib/apache2/modules/. I assume that means it is enabled.

My second try.
I added following syntax on the bottom of file, /etc/apache2/apache2.conf

RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule (.*) https://mylink.edy/~username/login.php/$1 [L,R]

It is still not working.
Can somebody tell me what modules do I need and how I enable them?
  #4 (permalink)  
Old 01-28-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
Quote:
Originally Posted by kumarrana View Post
mod_proxy.c is located under directory /usr/lib/apache2/modules/. I assume that means it is enabled.
No. You mus specifically tell Apache to use mod_proxy.

Quote:
It is still not working.
Can somebody tell me what modules do I need and how I enable them?
The Rewrite Module is enabled; otherwise, these directives would fail.

Are you sure SSL is enabled?? Try this:

Code:
RewriteRule ^fubar$  http://www.unix.com [R]

Now reload the config, visit your server's address with "fubar" as the destination. If you don't get redirected to The UNIX and Linux Forums - Learn UNIX and Linux from Experts, then it's possible that portion of the configuration is never being hit.

One reason can be that your config has VirtualHosts and you are visiting such a VirtualHost which somehow overrides the RewriteEngine settings.
  #5 (permalink)  
Old 01-29-2009
kumarrana kumarrana is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 28
Yes. SSL is enabled. I can browse site using http and https since root directory set for both are same. Biggest confusion is which file do I use to configure auto-redirect. I using this link for reference.

AFP548 - Redirect http to https
  #6 (permalink)  
Old 01-29-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
Did you try my fubar rewrite rule?

Theoretically, any config file read in by httpd.conf can be used to configure the Rewrite rules.
  #7 (permalink)  
Old 02-03-2009
kumarrana kumarrana is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 28
Sorry otheus, It took so long to replay your message. Your fubar rewrite rule did not work on any of three config files. What am I missing? Can you tell me how to activate what module for rewrite?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0