10

I'm preparing a new CentOS Linux server, one of many. When I try to configure SSL on this server, I noticed there is no ssl.conf file. Not in /etc/httpd/conf.d/ssl.conf and not in /etc/httpd/conf/ssl.conf.

I also tried locate ssl.conf and got no result.

Do I need to create it myself? Can I copy the file from the other CentOS server I have? Is it OK to do that?

Centos 6.3(64bit), Apache/2.2.15 (CentOS) , PHP Version 5.3.3, MySQLi 5.1.73

muru
  • 69,900
  • 13
  • 192
  • 292
Rodniko
  • 203
  • 1
  • 2
  • 5

1 Answers1

18

You need to install mod_ssl. Run:

sudo yum install mod_ssl

And it will place the default configuration file in /etc/httpd/conf.d/ssl.conf.

If for some reason you have mod_ssl installed, but the file is not there and yum says Nothing to do, try to reinstall with:

sudo yum reinstall mod_ssl
techraf
  • 5,831
  • 10
  • 33
  • 51
  • Thank you for your quick reply. i did that and it writes "nothing to do" - Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: centos.syn.co.il * extras: centos.syn.co.il * updates: centos.syn.co.il Setting up Install Process Package 1:mod_ssl-2.2.15-47.el6.centos.3.x86_64 already installed and latest version Nothing to do – Rodniko Feb 15 '16 at 14:18
  • but is still created the file :) (although it wrote "already installed") – Rodniko Feb 15 '16 at 14:41
  • That's interesting, I just booted 6.3 to check... I removed the file and install did not put it back, but then `sudo yum reinstall mod_ssl` did. – techraf Feb 15 '16 at 14:42
  • @techraf Its very helpful post and time consuming thanks – Fawwad Mar 22 '18 at 12:01
  • 1
    For anyone doing install on Amazon EC2 with httpd24 installed, please try `sudo yum install mod24_ssl` – Alyas Dec 03 '18 at 22:09
  • If you're getting `Package(s) mod_ssl available, but not installed. Error: Nothing to do` Try `yum search mod_ssl ` then `then yum install mod_ssl.XX <- as listed from yum search output.` (src: https://serverfault.com/questions/355481/installing-mod-ssl-on-centos) – Sam Jun 22 '19 at 19:35