LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-10-2007, 02:17 PM   #1
technodweeb
Member
 
Registered: Dec 2006
Location: South Dakota
Distribution: Red Hat, Ubuntu
Posts: 32

Rep: Reputation: 2
Unhappy 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.
 
Old 07-10-2007, 02:43 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Have you tired doing a header rewite rule?
 
Old 07-10-2007, 02:48 PM   #3
technodweeb
Member
 
Registered: Dec 2006
Location: South Dakota
Distribution: Red Hat, Ubuntu
Posts: 32

Original Poster
Rep: Reputation: 2
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
 
Old 07-10-2007, 03:11 PM   #4
technodweeb
Member
 
Registered: Dec 2006
Location: South Dakota
Distribution: Red Hat, Ubuntu
Posts: 32

Original Poster
Rep: Reputation: 2
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.
 
Old 07-10-2007, 03:17 PM   #5
a1danel
LQ Newbie
 
Registered: Apr 2007
Location: California
Distribution: Debian/Redhat/Fedora
Posts: 18

Rep: Reputation: 0
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>
 
Old 07-10-2007, 08:42 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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.
 
Old 07-11-2007, 12:38 AM   #7
p_s_shah
Member
 
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 237
Blog Entries: 1

Rep: Reputation: 34
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.
 
Old 07-11-2007, 08:43 AM   #8
technodweeb
Member
 
Registered: Dec 2006
Location: South Dakota
Distribution: Red Hat, Ubuntu
Posts: 32

Original Poster
Rep: Reputation: 2
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.
 
Old 03-08-2013, 08:01 AM   #9
Bullethead21
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
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
 
Old 03-08-2013, 12:42 PM   #10
lrtward
Member
 
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97

Rep: Reputation: 9
Quote:
Originally Posted by Bullethead21 View Post
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):
Quote:
SSL CentOS apache
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:
Quote:
apache rewrite https
You may wish to adjust your search criteria depending on whether you want to redirect your entire webserver/domain or just certain directories.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_rewrite - rule to change http to https Firebar Linux - Server 10 06-05-2007 07:29 AM
Can I run apache http and https on different servers for one domain? izghitu Linux - Software 1 07-04-2006 12:58 PM
Apache 2: forward http to https? OneSeventeen Linux - Software 2 07-03-2006 07:10 AM
HTTPS, HTTP, SSH on Fedora Core 5, Linksys WRT54G router, can see page on LAN dracoscool Linux - Networking 2 04-13-2006 02:32 AM
Apache as proxy for http & https queries gosha Linux - Networking 0 07-21-2003 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration