Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Redirect to secure site

Posted on 2003-11-23
1
Medium Priority
?
754 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
periwinkle earned 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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 …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

604 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