Solved

Redirect to secure site

Posted on 2003-11-23
1
748 Views
Last Modified: 2010-05-18
I have an apache server running normally on port 80 and securely on port 443 as standard.  I only want connections to the secure site but i dont want to just comment out the Listen 80 line in the apache config document rather I would like it if someone connects to port 80, only 1 document can be viewed and all other pages will be shown as 404.  On this document would be a short ammount of text saying, this server is only available over a secure connection, please click the link below to connect securly, clicking the link would r-direct the user to https:// rather that http://

Anyone know how this is possible ??

Thanks !
0
Comment
Question by:Kevin_R
1 Comment
 
LVL 15

Accepted Solution

by:
periwinkle earned 500 total points
ID: 9819182
Sure - set up the configuration so that the SSL pages and the non-secure pages point to different document roots.  For example:

<VirtualHost 1.2.3.4:80>
ServerName www.mydomain.com
ServerAlias mydomain.com
DocumentRoot /home/user/www
...
</VirtualHost>

<VirtualHost 1.2.3.4:443>
ServerName www.mydomain.com
ServerAlias mydomain.com
DocumentRoot /home/user/securewww
...
</VirtualHost>



0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question