LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2011, 03:58 AM   #1
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Rep: Reputation: 15
How to STOP using HTTP


Hi,

does anyone knows how to implement HTTPS instead of HTTP in webserver.

i have linux webserver running on centos everyone can able to access thru http
and also https.

my question is how can i fully implement in my web server using HTTPS and stop HTTP.




please help

thanks
 
Old 03-24-2011, 04:04 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

The simplest way would be to redirect http traffic to https and thus forcing use of https. Have a look at this site which explains it very easy. I think this is the simplest way to redirect all traffic. You could also use mod_rewrite but that's more url based I believe. This 'redirect' is general and enforces all traffic to https.

Kind regards,

Eric
 
1 members found this post helpful.
Old 03-24-2011, 04:49 AM   #3
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hello,

The simplest way would be to redirect http traffic to https and thus forcing use of https. Have a look at this site which explains it very easy. I think this is the simplest way to redirect all traffic. You could also use mod_rewrite but that's more url based I believe. This 'redirect' is general and enforces all traffic to https.

Kind regards,

Eric
Thanks for your reply

I append like this Redirect permanent / https://tailin.localgroupware.com

the problem is I got this error

[root@server ssl]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[root@server ssl]# service httpd stop
Stopping httpd: [FAILED]
[root@server ssl]# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]


thanks
 
Old 03-24-2011, 05:09 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Check your configuration again. Something is not right, or your httpd processes didn't shut down correctly. See if any other instances are running, that you don't have any open files related to httpd and try again. Bind your httpd to one IP instead of all and try restarting again.

Kind regards,

Eric
 
1 members found this post helpful.
Old 03-24-2011, 05:54 AM   #5
sandy.bhadoriya
Member
 
Registered: Dec 2010
Posts: 31

Rep: Reputation: 3
try netstat and get to know what is running on port 80
and kill that process and restart the httpd services
 
Old 03-24-2011, 08:26 AM   #6
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 239

Rep: Reputation: 14
cheese,
check the "httpd.conf" file and change the address assigned, also it would be better if you can post the log.

Regards.
 
Old 03-24-2011, 08:04 PM   #7
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hi,

Check your configuration again. Something is not right, or your httpd processes didn't shut down correctly. See if any other instances are running, that you don't have any open files related to httpd and try again. Bind your httpd to one IP instead of all and try restarting again.

Kind regards,

Eric
Hi

Thanks for your reply

in my httpd.conf i append like this
# Redirect permanent /foo http://www.example.com/bar
Redirect permanent /var/www/html/groupware https://www.tailin.localgroupware.co...ware/login.php



coz in my web server i have sub folder. for example in my rootpath is in the /var/www/html/ then it has lots of folder like groupware

so users when they browse it, is like this http://www.tailin.localgroupware.com/groupware


now the problem still i can access thru http but and not auto redirect to https


thanks
 
Old 08-16-2011, 04:08 AM   #8
salemeni
Member
 
Registered: Aug 2011
Posts: 64

Rep: Reputation: Disabled
Post

Quote:
Originally Posted by cheesewizz View Post
Hi

Thanks for your reply

in my httpd.conf i append like this
# Redirect permanent /foo http://www.example.com/bar
Redirect permanent /var/www/html/groupware https://www.tailin.localgroupware.co...ware/login.php



coz in my web server i have sub folder. for example in my rootpath is in the /var/www/html/ then it has lots of folder like groupware

so users when they browse it, is like this http://www.tailin.localgroupware.com/groupware


now the problem still i can access thru http but and not auto redirect to https


thanks
Try to use mod rewrite

Code:
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
generics array

Last edited by salemeni; 12-06-2011 at 03:58 AM.
 
  


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
apache: http://localhost (work) http://ipaddress (not working) sarmad Linux - Newbie 7 02-05-2013 08:47 AM
How to block HTTP requisitions with invalid/blank http referer field brgsousa Linux - Software 2 10-18-2010 03:49 PM
[SOLVED] Adding package sources fails saying "http://http not found skykooler Ubuntu 2 07-02-2010 10:32 AM
monodoc-http gives a http 500 internal server error ernesto_cgf Linux - Software 0 05-10-2007 04:48 PM
[SOLVED] Printing Help !! (http://localhost:631/) (WTF did it stop working?) MBA Whore Linux - Hardware 31 08-28-2006 02:35 AM


All times are GMT -5. The time now is 08:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration