LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-26-2007, 12:16 PM   #1
krnlcrash
LQ Newbie
 
Registered: Dec 2005
Distribution: Mandrake 10.1
Posts: 17

Rep: Reputation: 0
apache ssl_mod can't see new certificates


I finally found someone selling ssl certs at a cheap enough price to go ahead and buy one. Now that I got it, I can't seem to get my apache server to use them. The server keeps wanting to use only the ones in the default location /etc/ssl/apache/server.crt My Version is:
# httpd -v
Server version: Apache/2.0.54
Server built: Jan 5 2006 11:10:01
# cat /proc/version
Linux version 2.6.12-12mdksmp (apatard@n1.mandriva.com) (gcc version 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)) #1 SMP Fri Sep 9 17:43:23 CEST 2005

Now I downloaded the new certificates and placed them in /etc/ssl/apache/official
# ls /etc/ssl/apache/official/
gd_intermediate_bundle.crt
my.domain.com.crt
my.domain.com.csr
my.domain.com.key

I double checked the permissions, all should be fine.

Here is my httpd.conf file that specifies the ssl config:
Code:
LoadModule ssl_module /usr/lib/apache-extramodules/mod_ssl.so

<IfDefine SSL>
    Listen 80
    Listen 443

    SSLMutex /var/log/httpd/ssl_mutex
    SSLSessionCache dbm:/var/log/httpd/ssl_gcache_data
    SSLRandomSeed startup builtin

    SSLLog /var/log/httpd/ssl.log
    SSLLogLevel warn

  <VirtualHost my.domain.com:443>

    SSLEngine On
    SSLCipherSuite  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eN$
    SSLCertificateKeyFile /etc/ssl/apache/official/my.domain.com.key
    SSLCertificateFile /etc/ssl/apache/official/my.domain.com.crt
    SSLCertificateChainFile /etc/ssl/apache/official/gd_intermediate_bundle.crt
    ServerName my.domain.com
    ServerAlias domain.com
    DocumentRoot /var/www/cgi-bin
    CustomLog /var/log/httpd/access_log.my.domain.com combined
    ErrorLog /var/log/httpd/error_log.my.domain.com
    SetEnvIf User-Agent ".*MSIE.*" \
           nokeepalive ssl-unclean-shutdown \
           downgrade-1.0 force-response-1.0
    <Files ~ "\.(cgi|shtml|phtml|php3?|php|inc)$">
          SSLOptions +StdEnvVars
    </Files>
  </VirtualHost>
</IfDefine>
Am I missing something? Why doesn't Apache find the new certificates?

I've already tried replacing the default certificate with the new one, but this causes httpd to hang on startup.

Any help would be appreciated.

thanks

Last edited by krnlcrash; 03-26-2007 at 12:24 PM.
 
Old 03-27-2007, 06:41 AM   #2
krnlcrash
LQ Newbie
 
Registered: Dec 2005
Distribution: Mandrake 10.1
Posts: 17

Original Poster
Rep: Reputation: 0
Ok, I found out that I have a file /etc/httpd/modules.d/httd41_mod_ssl.default-vhost.conf that defines where the certificatds are, effectively trumping any setting I place in /etc/httpd/conf/httpd.conf.

So when I change the settings to point to the correct certificates, my web server hangs on startup. I am assuming it is because I am supposed to be prompted for the password to open the key file, but I do not get such a prompt when running /etc/init.d/httpd restart.

Anyone able to point me in the right direction to get Apache set up correctly?
 
Old 03-27-2007, 08:24 AM   #3
krnlcrash
LQ Newbie
 
Registered: Dec 2005
Distribution: Mandrake 10.1
Posts: 17

Original Poster
Rep: Reputation: 0
Don't you hate it when after you post you find your answer and in the end makes you look not so smat?

If anyone else runs into this, here is the answer:

# Remove the encryption from the RSA private key (while keeping a backup copy of the original file):

$ cp server.key server.key.org
$ openssl rsa -in server.key.org -out server.key

# Make sure the server.key file is only readable by root:

$ chmod 400 server.key


Find more helpful tips at: http://httpd.apache.org/docs/2.0/ssl...movepassphrase
 
  


Reply



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
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 07:28 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:44 AM.

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