LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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, 03: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, 03:43 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Have you tired doing a header rewite rule?
 
Old 07-10-2007, 03: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, 04: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, 04:17 PM   #5
a1danel
LQ Newbie
 
Registered: Apr 2007
Location: California
Distribution: Debian/Redhat/Fedora
Posts: 17

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, 09:42 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
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, 01: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: 228
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, 09: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, 09: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, 01: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:29 AM
Can I run apache http and https on different servers for one domain? izghitu Linux - Software 1 07-04-2006 01:58 PM
Apache 2: forward http to https? OneSeventeen Linux - Software 2 07-03-2006 08:10 AM
HTTPS, HTTP, SSH on Fedora Core 5, Linksys WRT54G router, can see page on LAN dracoscool Linux - Networking 2 04-13-2006 03:32 AM
Apache as proxy for http & https queries gosha Linux - Networking 0 07-21-2003 08:41 AM


All times are GMT -5. The time now is 11:19 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration