LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-26-2016, 11:45 PM   #1
ebcdic
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Rep: Reputation: 0
Smile Redirect all traffic to https FQDN


Hi,

I'm using RHEL, and I have a SSL cert that points to https://websitename.domain.com

The problem is, if you go to either http://websitename or https://websitename or http://servername https://servername it all goes to an invalid certificate which is showing as a vulnerability.

Is there a way for me to do something like a .htaccess redirect so anything will be redirected to https://websitename.domain.com ?

If someone can help me with the code for this I'd appreciate it greatly.

Thanks!
 
Old 05-27-2016, 01:17 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
2 posts since 2007, oh boy.
Hi and Hello.
Is the SSL Cert for https://websitename.domain.com a Wildcard Cert?
Self-signed, Ca, or other...?

tomcat, apache, java, nginx, litespeed are all popular web servers.
Pick one.

Armchair Admins:
Yes, htaccess implies apache...duh.

Last edited by Habitual; 05-27-2016 at 01:18 PM.
 
Old 05-27-2016, 02:36 PM   #3
ebcdic
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you for the reply, appreciate it.

The certs are signed by an internal CA, not a wildcard cert, stored in a certificates.ks file.

It's running httpd-2.2.3-91.el5 on RHEL which should be Apache

Just for fun, here is the guide for how I generate the csr, then send them off to the ca, and then import them. I have two do two certs.

https://kb.vmware.com/selfservice/mi...rnalId=1026309

Any help would be appreciated. Thanks again.
 
Old 05-29-2016, 08:23 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
I've always just handled this situation with an HTTP redirect. For example, in the Apache VirtualHost for websitename, you can have:

Code:
Redirect permanent / https://websitename.domain.com/
This will redirect all requests handled by that virtual host to the virtual host with the correct SSL certificate.
 
  


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
Nginx, Horde, Https, Redirect, This webpage has a redirect loop axetone Ubuntu 0 02-08-2015 10:44 PM
[SOLVED] how to keep all traffic on LAN for own fqdn rytec Linux - Networking 1 03-12-2012 03:29 PM
apache 2.0 https to https redirect struct Linux - Software 1 04-22-2011 05:43 PM
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM

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

All times are GMT -5. The time now is 06:43 PM.

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