Recompile Apache2 but add SSL without damaging Mysql/PHP installation

Posted on 2006-04-13
Last Modified: 2012-06-27
Fedora Core 3
Running Apache 2.0.55, MySQL 4.1, PHP 4.3.2 (all installed from source)

Ok, so the problem is that I did not install SSL when I compiled Apache2 and I want to add open_ssl (or mod ssl ??) to the current apache2 installation.  I am assuming, from reading other articles, that I will need to run ./configure again for apache2 but add the SSL configure options.

Question 1: If I do recompile apache with SSL, will this step on my current MySQL /PHP installations?  I don't want to have to reinstall PHP and MySQL all over again

Question 2: this current server previously had apache2 with SSL installed and I see an existing KEY stored in /home/ssl with two files: localhost.key and localhost.key.unsecure.  When I configure SSL, should I somehow point to these files to use that key?  I can't find a .csr file at all.

Question 3: Here is the ./configure command I used (that is lacking SSL):
./configure    --prefix=/usr/local/apache2    --enable-so    --enable-auth-digest    --enable-rewrite    --enable-setenvif    --enable-mime    --enable-deflate    --enable-headers

  So if I wanted to recompile with SSL exactly what options do I add to the configur line, and where exactly do I install from?

Question by:djs120
    LVL 19

    Accepted Solution

    First install (if you didn't installed it previously) OpenSSL library (
    After OpenSSL installation You should add to yor configure line option --enable-ssl. So in your case it will look like:
    ./configure    --prefix=/usr/local/apache2    --enable-so    --enable-auth-digest    --enable-rewrite    --enable-setenvif    --enable-mime    --enable-deflate    --enable-headers --enable-ssl

    After compilation and installation configure you httpd.conf (and additional ssl.conf) to have an SSL virtual host. Check for details of configuration.
    You PHP module installtion will not be broken.

    LVL 1

    Author Comment

    And after I reinstall apache2 with SSL, how can I install the localhost.key file that already exists on the server?  Will I have to go through with the temporary 30 day SSL that comes with the openSSL setup?
    LVL 19

    Expert Comment

    you should point to that file in the ssl.conf file. Check SSLCertificateKeyFile directive
    LVL 1

    Author Comment

    Sorry if this is a dumb question, but do I need to do anything with "mod_ssl" and apache, or does "--enable-ssl" automatically setup mod_ssl?
    LVL 1

    Author Comment

    Worked great with no problems.  All I had to do was copy the "ssl.crt" and "ssl.key" directories from the old apache installation and copy them over into the conf/ dir of the new apache install and restart with 'apacheclt startssl'.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now