15

I am trying to support HTTPS traffic with the mod_ssl module on my website. I am running an Amazon EC2 instance for my server. I have installed and configured the basic LAMP packages. However, when I go to put in SSL-specific commands in my apache config files (ie. SSLEngine, SSLCertificateFile, etc) it spits out an error and says that I have a syntax error or the module is not loaded.

My next step was to try $ sudo yum install mod_ssl. However, yum comes back and says, "Processing Conflict...Error: httpd24-tools conflicts with httpd-tools". So, I figured that mod_ssl is included in the httpd-tools package. I then ran $ sudo yum install httpd24-tools but it comes back and tells me I already have that package installed.

Now how come I have the httpd-tools package installed, and mod_ssl is not loaded in my system? Isn't mod_ssl included in the httpd-tools package? I created a test php file <?php echo phpinfo(); ?> just to make sure. My suspicions were confirmed—no 'mod_ssl' is listed under the apache2handler loaded modules table in phpinfo.

So, I'm not exactly sure how to load in/install/configure mod_ssl with the Amazon Linux AMI's. Any help would be appreciated. Here's my current specs:

  • Amazon Linux AMI 2012.09
  • Apache 2.4
  • PHP 5.4

Ran this command to setup server:

$ sudo yum install httpd24 php54 php54-devel php54-mysql php54-common php54-gd php54-xml php54-mbstring php54-mcrypt php54-pecl-apc mysql-server mod_ssl openssl httpd54-devel mysql libjpeg libpng phpmyadmin
kaffolder
  • 285
  • 1
  • 2
  • 7
  • What Apache config did you use? I'd guess syntax error over module not loaded, as it should be standard in most distributions at this point. – ceejayoz Jan 15 '13 at 17:17
  • 8
    Came across an answer while scouring forums. _"All Apache modules built for httpd-2.4 have been renamed mod24\_. So for the SSL Apache module the package is called mod24\_ssl."_ Solution: `$ sudo yum install mod24_ssl`. This installed the package successfully, but now when I try and restart my Apache server, it fails to start httpd. Any thoughts? – kaffolder Jan 15 '13 at 17:28
  • Check your logs. – ceejayoz Jan 15 '13 at 17:33
  • :) Sometimes it's the easy things. ;) All I had to do was tweak a few settings in my _/etc/httpd/conf.d/ssl.conf_ file. Good to go! Thanks for the help! – kaffolder Jan 15 '13 at 17:36
  • 1
    Please add your answer on the answers section and mark it as answered. I had the same problem and did come across this answer but i didn't read the comments until days later when i realized it actually had the answer. – Pochi Jan 26 '14 at 11:36

1 Answers1

34

Try to run yum install mod24_ssl instead, which I think you've already done. Any packages that have additional versions usually require the version to be specified for any dependencies. So everything for php54 would be prefixed with php54-.

If you're ever unsure, you can always do a yum search with some keywords. For example: yum search mod ssl lists the available packages.

Mathias Bynens
  • 696
  • 1
  • 10
  • 15
jaseeey
  • 1,462
  • 16
  • 20