Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: santiagon on March 19, 2007, 10:53:35 PM

Title: Redirecting all web traffic from HTTP to HTTPS
Post by: santiagon on March 19, 2007, 10:53:35 PM
Hi all--

I tried searching SSL and HTTPS, to no avail.

Is there a way of effectively redirecting any traffic bound for port 80 (HTTP) to port 443 (HTTPS)?

I know that the server manager does it, along with some contribs, but is there a way to make it work for the entire Apache setup?

Please advise.
Title: Redirecting all web traffic from HTTP to HTTPS
Post by: bpivk on March 19, 2007, 11:58:56 PM
Stupid question... Why would you want to do that?
Title: Redirecting all web traffic from HTTP to HTTPS
Post by: santiagon on March 20, 2007, 12:14:56 AM
I'm using this box basically as a secure DB server, so all web traffic should be SSLed.
Title: Redirecting all web traffic from HTTP to HTTPS
Post by: cactus on March 20, 2007, 05:05:25 PM
Quote from: "santiagon"
I'm using this box basically as a secure DB server, so all web traffic should be SSLed.
Add a general rewrite rule like done for the server-manager and webmail, see the configuration templates and the /etc/httpd/conf/httpd.cionf configuration file.
Title: Redirecting all web traffic from HTTP to HTTPS
Post by: william_syd on March 21, 2007, 04:46:50 AM
Part solution... stop listening on port 80.
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
touch /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/35Listen80
expand-template /etc/httpd/conf/httpd.conf
/etc/rc7.d/S86httpd-e-smith restart
Title: Redirecting all web traffic from HTTP to HTTPS
Post by: cactus on March 21, 2007, 09:34:36 AM
Quote from: "william_syd"
Part solution... stop listening on port 80.
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
touch /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/35Listen80
expand-template /etc/httpd/conf/httpd.conf
/etc/rc7.d/S86httpd-e-smith restart

In combination with the rewrite rule above would make it complete.