避免apache重启时提示输入ssl密码

 

How can I get rid of the pass-phrase dialog at Apache startup time?

The reason why this dialog pops up at startup and every re-start is
that the RSA private key inside your server.key file is stored in
encrypted format for security reasons. The pass-phrase is needed to be
able to read and parse this file. When you can be sure that your server
is secure enough you perform two steps:



Remove the encryption from the RSA private key (while preserving 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 now only readable by root:



$ chmod 400 server.key





Now server.key will contain an unencrypted copy of the key. If you
point your server at this file it will not prompt you for a
pass-phrase. HOWEVER, if anyone gets this key they will be able to
impersonate you on the net. PLEASE make sure that the permissions on
that file are really such that only root or the web server user can
read it (preferably get your web server to start as root but run as
another server, and have the key readable only by root).



As an alternative approach you can use the ``SSLPassPhraseDialog
exec:/path/to/program'' facility. But keep in mind that this is neither
more nor less secure, of course.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值