LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-22-2018, 04:34 AM   #1
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Rep: Reputation: Disabled
Update apache ssl cert


I use apache web server on centos 7.4

Now the apache do not have a SSL cert , I would like to add it , except add the cert files to the server , config the apache file , would advise what else I need to do ?
 
Old 10-22-2018, 06:23 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,473

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
You might want to also redirect any http:// traffic to https://
 
2 members found this post helpful.
Old 10-22-2018, 11:23 PM   #3
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
You might want to also redirect any http:// traffic to https://
Thanks reply ,

How to do the redirect , set it in apache or DNS ?
 
Old 10-23-2018, 12:19 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
DNS doesn't know anything about web protocols. So, the answer is Apache. You will find a ton of tutorials on the internet, for example https://www.digitalocean.com/communi...ache-and-nginx (DigitalOcean's tutorials are generally good).
 
1 members found this post helpful.
Old 10-23-2018, 03:11 AM   #5
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
DNS doesn't know anything about web protocols. So, the answer is Apache. You will find a ton of tutorials on the internet, for example https://www.digitalocean.com/communi...ache-and-nginx (DigitalOcean's tutorials are generally good).
thanks reply

About the http redirct to https .

If I update the apache file to point to the ssl cert but do not set http redirct to https , does the browsing will automatically go to https first then go to http ? config http redirct to https is only for safe ? that means if no http to https redirection , user input http then to to http:// , user input https then go to https:// ?

Last edited by catiewong; 10-23-2018 at 03:16 AM.
 
Old 10-23-2018, 06:24 AM   #6
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
If you don't force http -> https, then it depends on what the remote person puts in their browser. There are lots of good web pages on this subject. Try: RHEL 7 Web Servers for one.
 
1 members found this post helpful.
Old 10-23-2018, 11:59 PM   #7
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bradvan View Post
If you don't force http -> https, then it depends on what the remote person puts in their browser. There are lots of good web pages on this subject. Try: RHEL 7 Web Servers for one.
"then it depends on what the remote person puts in their browser" <<== sorry , I don't understand what it means , that mean if no redirection , it depends the user use http or https , if http then go to http , if https then go to https ?

Last edited by catiewong; 10-24-2018 at 01:40 AM.
 
Old 10-24-2018, 04:03 AM   #8
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
Correct. If you are allowing both an http and an https connection, then which the remote user connects to depends on what they type in to their browser. If you are OK with that, then good. If not, force re-direction of http to https. It all depends on what you are providing on your web page.
 
1 members found this post helpful.
Old 10-24-2018, 06:06 AM   #9
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Another question ,

In my apache configuration for http , there are many module are loaded , I am wonder if there is another modules will be needed to make https to work ?

LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule heartmonitor_module modules/mod_heartmonitor.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
 
Old 10-24-2018, 07:06 AM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
You need mod_ssl.

However, this has nothing to do with the title of this thread. Questions that are not related should go into separate threads.

Last edited by berndbausch; 10-24-2018 at 07:09 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
how to configure Apache with one SSL cert for primary domain, another wildcard cert for subdomains? sneakyimp Linux - Server 5 05-08-2018 12:36 AM
the art of installing ssl cert for apache on ubuntu sneakyimp Linux - Server 2 03-17-2018 12:24 PM
Apache 2.4 Microsoft Root CA SSL Cert Errors: SSLCACertificateFile gdizzle Linux - Newbie 1 10-24-2014 01:39 AM
SSL Cert and Apache ajburch Linux - Server 1 05-13-2014 03:15 PM
trying to install SSL cert on apache 2.0 sneakyimp Linux - Security 6 07-23-2006 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:40 PM.

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