LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   mod_ssl cannot find a private key (https://www.linuxquestions.org/questions/linux-general-1/mod_ssl-cannot-find-a-private-key-160994/)

ner 03-22-2004 12:27 PM

mod_ssl cannot find a private key
 
Hi,

I just installed apache with mod-ssl and it was working fine, but then I moved everything to /chroot, and now my mod_ssl is reporting an Error: Private Key not found, even though I am pointing at the key in my httpd.conf
Does anybody know what could be a problem?

Nerita

trickykid 03-22-2004 12:55 PM

Is /chroot a directory you made? And what does it say in your httpd.conf file for location?

ner 03-22-2004 01:20 PM

yes, /chroot is a directory, and I moved all apache files there, and all libraries, and the certificate and the private key, and in the httpd.conf the key location is:

SSLCertificateKeyFile /etc/ssl/private/server.key

and the certificate:

SSLCertificateFile /etc/ssl/certs/server.crt

jschiwal 03-22-2004 03:37 PM

Is appache running in a jail. Are there /chroot/etc/ssl/private/server.key and a /chroot/etc/ssl/certs/server.crt files. I believe that appache is being run with /chroot as the new root. Therefore in the environment that apache is run, /chroot is the new root (/) partition, and files that apache needs to run that are outside this new root partition, need to be located inside the jail.

ner 03-22-2004 03:41 PM

yes, I do have the certificate and the key copied to /chroot/etc/ssl/certs/server.crt and /chroot/etc/ssl/private/server.key and it still doesn't find it...

UPDATE: Yesterday I was playing around with the key, and found out, that as long as I use unencrypted key, it works just fine, but as soon as I encrypt it, it says it cannot find it... Could there be something wrong with my encryption program?

markus1982 03-23-2004 11:42 AM

I suggest you make use of strace to locate the source of the problem. Also take a look at http://www.linux-corner.net/linux/papers/chrooting.html


All times are GMT -5. The time now is 04:01 PM.