Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Apache by using sudo yum -y install httpd instead of using wget and installing that way. This means that it has been set up differently.

I'm now trying to install ssl by using sudo yum install mod_ssl openssl-devel and I need to run this to configure it:

./configure --enable-so --enable-ssl 
make
sudo make install

I don't know where the configure file is for Apache because I installed it through yum instead.

Any ideas on what I need to do to configure SSL?

share|improve this question
    
What is httpd -M command output? – 7171u Nov 23 '15 at 13:33
    
Here is the output pastebin.com/Ld4YM29c – picko Nov 23 '15 at 13:39
    
As you can see from the output ssl_module(shared) ssl is already enabled. Now try configuring vhosts with ssl (https). – 7171u Nov 23 '15 at 13:43
    
./configure --enable-so --enable-ssl; make; sudo make install is only needed when you install mod_ssl from tar file. – 7171u Nov 23 '15 at 13:56
    
Thank you, that makes sense. How do I go about configuring vhosts? Sorry, this is the first time that I've done this. – picko Nov 23 '15 at 13:59

Presuming that you vhost configuration is in /etc/httpd/conf.d/my_vhost.conf

<VirtualHost *:443>
  ServerName _replace_with_hostname_

  DocumentRoot "/var/www/"

  <Directory "/var/www/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Require all granted
  </Directory>

  ## SSL directives
  SSLEngine on
  SSLCertificateFile      "/etc/pki/my_certs/my_vhost_public_cert.pem"
  SSLCertificateKeyFile   "/etc/pki/my_certs/my_vhost_private_cert.pem"
  SSLCACertificateFile    "/etc/pki/my_certs/my_vhost_ca_cert.pem"
</VirtualHost>

You need to add the lines bellow SSL directives and change the paths with the correct ones.

share|improve this answer
    
I have a <VirtualHost *:80> in my /etc/httpd/conf/httpd.conf file and I have a <VirtualHost *:443> like yours in /etc/httpd/conf.d/ssl.conf. I get ERR_CONNECTION_REFUSED when I go to https://<my-server-ip> – picko Nov 25 '15 at 17:00
    
Can you post the content for ssl.conf? – cristi Nov 26 '15 at 8:30
    
here is my ssl.conf pastebin.com/gsQbKY67 when I restart apache I'm asked for my RSA password but it still errors on https://<my-server-ip> – picko Nov 26 '15 at 10:41
    
output from "netstat -tulpn | grep 443" – cristi Nov 26 '15 at 12:32
    
tcp6 0 0 :::443 :::* LISTEN 2640/httpd – picko Nov 26 '15 at 12:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.