LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-20-2010, 12:18 PM   #1
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
need help with apache redirects in complex conf arrangement


I'm working with a server that unfortunately uses webhost manager and cpanel. I'm trying to force redirects that enforce the use of domains that are compatible with my SSL certs. This was working fine when it was just mydomain.com and www.domain.com, but now I have situation with:

* domain.com
* www.domain.com
* store.domain.com

We'd like to redirect https://www.store.domain.com to https://store.domain.com but this is not working. Instead of redirecting, we get the 'this connection is untrusted' dialog in a browser because The certificate is only valid for the following names: www.domain.com , store.domain.com , domain.com.

My guess is that for the HTTPS connection to be negotiated, the certificate must first be exchanged so everything can be secret. Is there some way to have the server redirect https requests for www.store.domain.com to store.domain.com without involving the cert?

Complicating matters is that there are probably 12 apache configuration files involved thanks to the magic of Webhost Manager. There's a main apache conf at /usr/local/apache/conf/httpd.conf which contains a VirtualHost directive for each domain and those VirtualHosts in turn includes a port80.conf and a port443.conf for each domain/subdomain being hosted.
 
Old 10-20-2010, 01:32 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
My guess is that for the HTTPS connection to be negotiated, the certificate must first be exchanged so everything can be secret. Is there some way to have the server redirect https requests for www.store.domain.com to store.domain.com without involving the cert?
You're right. The redirect in the server happens after the connection is established. This means that since it's a ssl connection the certificate is read first by the browser before anything else.
So, I'm afraid you cannot do anything, except using a wildcard ssl certificate.

Regards
 
1 members found this post helpful.
  


Reply



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
Configuring Automatic Redirects from port 80 to port 443 with bundled Apache server kaplan71 Fedora 1 12-28-2007 08:30 AM
Automatic Redirects in Apache kaplan71 Linux - Server 1 03-08-2007 07:09 AM
Apache redirects?! How rincewind Linux - Software 3 02-23-2005 02:43 PM
Apache: Request exceeded the limit of 10 internal redirects guarriman Linux - General 1 01-26-2005 08:06 AM
apache, complex .htaccess control with ip/pass, is this possible? SBing Linux - Software 0 05-27-2004 07:53 AM

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

All times are GMT -5. The time now is 04:44 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
Open Source Consulting | Domain Registration