Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 25th, 2013, 12:51 PM
Tant Tant is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Location: PNW
Posts: 3 Tant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 17 m 51 sec
Reputation Power: 0
[Resolved] Help w/wild car cert and subdomain on Apache 2.2.6

Hi there,

I've been tasked with replacing a standard SSL cert for a website with a wildcard cert. I've got the new cert installed and now need to adjust the httpd.conf file to address the new subdomain (I'll call 'newww').

Current re-write rule takes traffic from port 80, rewrites the url and passes it off to port 443 which in turn proxys to a glassfish server on the back-end.

Current catch-all rewrite rule:

RewriteRule ^(.*)$ https:/ /www . site. com / wingnut/jello$1 [L,R]

The desire is to adjust the httpd.conf so that the rewrite will retain either 'www' or 'newww'.

I'm guessing by what reading that I've done that I'd need to insert some sort of RewriteCond however I'm unsure of how to properly format it.

Thank you in advance.

~Tant

Last edited by Tant : February 25th, 2013 at 03:22 PM. Reason: Marking as resolved.

Reply With Quote
  #2  
Old February 25th, 2013, 02:20 PM
requinix's Avatar
requinix requinix is offline
Still alive
Dev Shed God 16th Plane (12500 - 12999 posts)
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,877 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 5 Days 7 h 57 m 15 sec
Reputation Power: 8977
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
Not entirely sure of your requirements and setup but is it just a matter of
Code:
RewriteRule ^(.*)$ https://newww.site.com/wingnut/jello$1 [L,R]

Reply With Quote
  #3  
Old February 25th, 2013, 02:43 PM
Tant Tant is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Location: PNW
Posts: 3 Tant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 17 m 51 sec
Reputation Power: 0
Thank you requinix.

The only requirement would be that Apache should take http:// www. site. com and rewrite it to https://www. site. com/wingnut/jello$

as well as take http:// newwww .site. com and rewrite it to https:/// newwww. site. com/wingnut/jello$

So that regardless of the subdomain (www or newww) entered by the web-user the URL is re-written to include the subdomain as well as append /wingnut/jello$ before passing it off.

In short:

Current: http:// www. site. com/ ---> http:// www. site. com/wingnut/jello$

Desired:

Retain current configuration as well as

Add: http:// newwww. site. com/ ---> https:// newwww. site. com/wingnut/jello$

I've got the www site set up in a virtual domains that rewrites the entire URL to HTTPS with the /wingnut/jello$ suffix which in turn is interpreted by ssl.conf before it proxypass/reverses information to a back-end Glassfish server.

The existing RewriteRule did the job until recently when it became a requirement to include the new subdomain name so the web-site owner can pass off traffic to this site from another site while maintaining the current site's www URL name.

~Tant

Reply With Quote
  #4  
Old February 25th, 2013, 03:12 PM
requinix's Avatar
requinix requinix is offline
Still alive
Dev Shed God 16th Plane (12500 - 12999 posts)
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,877 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 5 Days 7 h 57 m 15 sec
Reputation Power: 8977
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
So both www.site.com and newwwwwww.site.com get the HTTPS redirection?

Could make it easy and just say every domain gets rewritten.
Code:
RewriteRule ^ https://%{HTTP_HOST}/wingnut/jello%{REQUEST_URI} [L,R]

(the only functional difference being the HTTP_HOST)

Reply With Quote
  #5  
Old February 25th, 2013, 03:22 PM
Tant Tant is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Location: PNW
Posts: 3 Tant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 17 m 51 sec
Reputation Power: 0
Thanks again, Requinix, that did the trick. I'm a bit humbled as I knew that the formatting had to be simplistic but for the life of me I was having no luck with the different combinations I tried.

Cheers!

~Tant

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Help w/wild car cert and subdomain on Apache 2.2.6

Developer Shed Advertisers and Affiliates



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap