Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
forwarding http requests to https . . . .
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
GoofballJM1
Guru
Guru


Joined: 22 Mar 2004
Posts: 392
Location: Denver, CO USA

PostPosted: Thu Jun 08, 2006 3:56 pm    Post subject: forwarding http requests to https . . . . Reply with quote

I have an SSL based connection on a webserver here at my job. I would like all requests to the particular domain via a regular port 80 http request to forward automatically to the https (port 443). So all anyone has to do is type in the domain name without specifying which protocol/port they will be connecting on. How is this done?
_________________
"Great spirits have often encountered violent opposition from weak minds." - Albert Einstein
Back to top
View user's profile Send private message
lxg
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1019
Location: Aachen, Germany

PostPosted: Thu Jun 08, 2006 4:05 pm    Post subject: Reply with quote

Given you have an Apache webserver with IP-based virtual hosts (which I think is a common configuration these days), put the following somewhere in your config:

Code:

<VirtualHost xxx.xxx.xxx.xxx:80> # xxx.xxx.xxx.xxx being your IP
ServerName www.example.org
Redirect / https://www.example.org/
</VirtualHost>


Not tested, but should work. Don't forget to restart Apache.
_________________
lxg.de – codebits and tech talk
Back to top
View user's profile Send private message
GoofballJM1
Guru
Guru


Joined: 22 Mar 2004
Posts: 392
Location: Denver, CO USA

PostPosted: Thu Jun 08, 2006 4:09 pm    Post subject: Reply with quote

I will give that a try. Thanks for your quick response!
_________________
"Great spirits have often encountered violent opposition from weak minds." - Albert Einstein
Back to top
View user's profile Send private message
kg4ysy
Apprentice
Apprentice


Joined: 08 Jul 2006
Posts: 183
Location: North Carolina

PostPosted: Tue Jul 11, 2006 1:53 am    Post subject: Reply with quote

Is there anyway to use redirect without having to specify the domain name. At school I have multiple IP's which leads to a few different ways to access my computer. Can I just tell apache to redirect to port 443 without having to specify the IP? It doesn't seem possible from what I have seen around.

--Jim
Back to top
View user's profile Send private message
lxg
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1019
Location: Aachen, Germany

PostPosted: Wed Jul 12, 2006 4:04 pm    Post subject: Reply with quote

Unfortunately, no. Apache is, although able to forward single/simple requests, not designed to manage IP and port routing. Such things are better done with... a router. ;-)
_________________
lxg.de – codebits and tech talk
Back to top
View user's profile Send private message
kg4ysy
Apprentice
Apprentice


Joined: 08 Jul 2006
Posts: 183
Location: North Carolina

PostPosted: Wed Jul 12, 2006 4:39 pm    Post subject: Reply with quote

Yeah that's what I figured...thanks for seconding my belief on apache. Nice icon by the way...MEIN FURHER!...Mr. President...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum