How to start https service only?

Nathaniel Hall halln at otc.edu
Wed Feb 16 16:59:26 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hongwei Li wrote:
| Hi,
|
| I have a fc3 system that works well.  My question is how to make the
| system's web service available only to https, but not to regular http?
| i.e. people can browse this system only using https://my-server, but not
| http://my-server?  I tried to not open port 80, but only port 443 in
| iptables, but it seems no effect, http://my-server is still working.
|
| Thanks for any help!
|
| Hongwei Li
|
I had two coworkers do this last week.  If I remember what they did
correctly, one downloaded and installed mod_ssl the other modified the
/etc/httpd/conf/httpd.conf file to include this:

RewriteEngine   On
RewriteCond "%{SERVER_PORT}"        "^80$"
RewriteRule "^(.*)$"                "https://%{SERVER_NAME}$1" [R,L]

That will rewrite the address from http://whatever to https://whatever.

- --

Nathaniel Hall, GSEC
Intrusion Detection and Firewall Technician
Ozarks Technical Community College -- Office of Computer Networking

halln at otc.edu
417-447-7535
GPG Public Key ID: 0xAC187312
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)

iD8DBQFCE3vuc+QrUawYcxIRAgBXAJ4yiyEAQ7O9V0bVXrjPMxFSZUVWDwCfZt/P
7IlK4zaXh0wvcf6lJySq1OE=
=LqV3
-----END PGP SIGNATURE-----




More information about the fedora-list mailing list