LinuxQuestions.org
Help answer threads with 0 replies.
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
  Search this Thread
Old 02-27-2014, 06:27 AM   #1
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,373

Rep: Reputation: 135Reputation: 135
Error while page accessed in https


I have configured https on my server with apache which is in cloud.

The below Listen directives are enabled in it.

Code:
Listen 80
Listen 443
The port 80 is firewalled in cloud.
So I used port 443 to access it.
But the problem is that if both of the above Directives are enabled then only I am able to access the page with https.
If I am removing the
Code:
Listen 80
httpd started with 443 but I am not able to access the page and the log is showing giving
Code:
"GET /portal HTTP/1.1" 302 -
Can anyone help me understanding why this is happening. I have used the below rewrite rules:
Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*)$ https://myxenvm/$1 [NE]

Last edited by divyashree; 02-27-2014 at 06:34 AM.
 
Old 02-27-2014, 07:32 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,581

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Hi,

You don't need mod_rewrite (to redirect http to https), because as you said, port 80 is closed from the firewall.
For this reasom the RewriteCond will never met and clients will always access your server from port 443 (https). So the rewrite is useless.

Cheers
 
1 members found this post helpful.
Old 02-27-2014, 08:05 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,373

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by bathory View Post
Hi,

You don't need mod_rewrite (to redirect http to https), because as you said, port 80 is closed from the firewall.
For this reasom the RewriteCond will never met and clients will always access your server from port 443 (https). So the rewrite is useless.

Cheers
Thanks bathroy for the reply. So is this the mod_rewrite which is causing the issue ?
 
Old 02-27-2014, 08:56 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,581

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Quote:
Originally Posted by divyashree View Post
Thanks bathroy for the reply. So is this the mod_rewrite which is causing the issue ?
No it's not. As I told you the rewrite condition is never met, so the rewrite is not happening.
Check the apache configuration to see it there is a "Redirect" that gives the 302 response
 
Old 02-27-2014, 02:24 PM   #5
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,373

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by bathory View Post
No it's not. As I told you the rewrite condition is never met, so the rewrite is not happening.
Check the apache configuration to see it there is a "Redirect" that gives the 302 response
I removed the mod_rediect and its condtions.

But there is no 'Redirect' defined in the apache configuration .
 
Old 02-28-2014, 02:54 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,581

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Check if there is a .htaccess in document root that does the redirect.
Does this happen for any URL, or just for /portal?
Also could you post your entire apache conf file?
 
Old 03-04-2014, 10:21 PM   #7
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,373

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by bathory View Post
Check if there is a .htaccess in document root that does the redirect.
Does this happen for any URL, or just for /portal?
Also could you post your entire apache conf file?
Hi bathroy, thanks for the replies. The issue was in jboss configuration. The /portal from apache config file was redirecting to jboss by proxypass , but jboss was not configured for SSL connector. Now its working fine after configuring SSL connector.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
https certication error , the page can not be loaded via https ust Linux - Server 2 11-21-2013 09:49 PM
[SOLVED] apache https page issue DD554 Linux - Server 5 01-09-2011 04:36 AM
[SOLVED] Using curl to log in to https page. Chris_no Linux - General 3 09-03-2009 04:50 PM
Page Table Information needed ,Accessed By Threads aryasoumen Linux - Kernel 2 02-02-2009 02:35 AM
after moving web site to new server - certificate error loading https page jayunplugged Linux - General 3 03-06-2008 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:02 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration