| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-10-2007, 02:17 PM
|
#1
|
|
Member
Registered: Dec 2006
Location: South Dakota
Distribution: Red Hat, Ubuntu
Posts: 32
Rep:
|
how to change Apache page from http to https
I have a web page shared as a http site. I then installed SSL certificates and the same site is now available using https. How do I stop the httpd:// version from being available? Both can be accessed right now.
I am running Apache 2.0.52 on a Red Hat ES4 server.
Thanks.
|
|
|
|
07-10-2007, 02:43 PM
|
#2
|
|
Senior Member
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,782
Rep: 
|
Have you tired doing a header rewite rule?
|
|
|
|
07-10-2007, 02:48 PM
|
#3
|
|
Member
Registered: Dec 2006
Location: South Dakota
Distribution: Red Hat, Ubuntu
Posts: 32
Original Poster
Rep:
|
No I have not. I am new to Apache so I was not sure the right way to do this. Can you give a short explanation on using a rewrite rule?
Thanks
|
|
|
|
07-10-2007, 03:11 PM
|
#4
|
|
Member
Registered: Dec 2006
Location: South Dakota
Distribution: Red Hat, Ubuntu
Posts: 32
Original Poster
Rep:
|
I just looked up the rewrite info on the Apache.org site. It will take a little time to read it (about 20 pages), but it looks like it should work. i will reply with results when i get it implemented. Thanks for the direction.
|
|
|
|
07-10-2007, 03:17 PM
|
#5
|
|
LQ Newbie
Registered: Apr 2007
Location: California
Distribution: Debian/Redhat/Fedora
Posts: 17
Rep:
|
you can also put the following in your httpd.conf file
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1 #<--- if you want
</Location>
|
|
|
|
07-10-2007, 08:42 PM
|
#6
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,089
Rep: 
|
You should be able to comment out the line Listen 80 (Apache 2.0) and remove references to virtual hosts listening on port 80. That way, you're only listening for requests on port 443.
|
|
|
|
07-11-2007, 12:38 AM
|
#7
|
|
Member
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 212
Rep:
|
Make different document root for http and https pages.
Code:
<virtualhost example.com:80>
DocumentRoot /var/www/html/http/
</virtualhost>
<virtualhost example.com:443>
DocumentRoot /var/www/html/https/
</virtualhost>
Tell us if you still have problems.
|
|
|
|
07-11-2007, 08:43 AM
|
#8
|
|
Member
Registered: Dec 2006
Location: South Dakota
Distribution: Red Hat, Ubuntu
Posts: 32
Original Poster
Rep:
|
Thank you all for the suggestions. I have used the suggestion from gilead as I think it is the simplest and most efficient. With Listen 80 remarked out I get page not found with the http:// and only the https:// answers.
Thanks gilead.
|
|
|
|
03-08-2013, 08:01 AM
|
#9
|
|
LQ Newbie
Registered: Mar 2013
Posts: 1
Rep: 
|
Is there a thread that actually talks about how to convert a HTTP Apache install already in service to the secure HTTPS?
I know this thread is old, but it should be renamed to how to disable HTTPD which is what it talks about.
Thanks
|
|
|
|
03-08-2013, 12:42 PM
|
#10
|
|
Member
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97
Rep:
|
Quote:
Originally Posted by Bullethead21
Is there a thread that actually talks about how to convert a HTTP Apache install already in service to the secure HTTPS?
I know this thread is old, but it should be renamed to how to disable HTTPD which is what it talks about.
Thanks
|
You can find this information online pretty easily IF you know what to look for.
If you don't already have a certificate on your server, you'll want to search first for information on purchasing an SSL certificate or creating a self-signed certificate, and installing it. You can do that by searching for (for example): Of course you'll need to take your own OS into consideration.
Then you need to search for information on redirecting http connections to https connections. To find this information you could look for: You may wish to adjust your search criteria depending on whether you want to redirect your entire webserver/domain or just certain directories.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:42 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|