Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect http to https

Status
Not open for further replies.

derwent

Programmer
Joined
May 5, 2004
Messages
428
Location
GB
I'm an iis man but have been asked to find a way using apache to redirect all http requests to https.

I have found a few references to a mod rewrite feature but all the instructions left me after the first few lines. Does someone know of a good resource or tell me how to do this please step by step as I am a total newcomer to apache.

thanks
 
You should have to redirect anything. If you want all requests to use https for a particular domain, then change the port on the directory container. Look in the directory where you find httpd.conf. You should find a sub-directory called conf.d. Within this directory you'll find ssl.conf. All the directives needed for ssl are already setup in there. All you have to do is create a vhost container but instead of the standard port 80, you will use port 443. For example:

<VirtualHost *:443>

If you already have a vhost container for that domain, just copy it here and change the port from 80 to 443. As I said, this will force all requests to use https.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top