LinuxQuestions.org
Visit Jeremy's Blog.
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, 01:18 PM   #1
sneakyimp
Member
 
Registered: Dec 2004
Posts: 795

Rep: Reputation: 50
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, 02:32 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,973

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
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


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


All times are GMT -5. The time now is 11:00 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration