apache2.2.X配置CA證書後,怎麼樣隨系統啟動而啟動?
如題目。
配置SSL后 #./apachectl start
需要輸入密碼,怎麼樣把密碼寫入/etc/rc2.d/S50apache中呢? 如果大家有更好的方法請「簽名」
本人現S50apache內容:
#!/sbin/sh
case "$1" in
'start')
/usr/local/apache2/bin/apachectl start &
;;
'stop')
/usr/local/apache2/bin/apachectl stop &
;;
*)
echo "your message"
;;
esac
exit 0
《解決方案》
openssl genrsa -des3 -out "%CA_NAME%.key" 1024
openssl rsa -noout -text -in "%CA_NAME%.key"
openssl rsa -in "%CA_NAME%.key" -out "%CA_NAME%.key.unsecure"
openssl req -new -x509 -days 365 -key "%CA_NAME%.key" -out "%CA_NAME%.crt"
openssl x509 -noout -text -in "%CA_NAME%.crt"
copy "%CA_NAME%.key" "%CA_NAME%.key.org"
openssl rsa -in "%CA_NAME%.key.org" -out "%CA_NAME%.key"
《解決方案》
原帖由 HonestQiao 於 2006-10-16 14:38 發表
openssl genrsa -des3 -out "%CA_NAME%.key" 1024
openssl rsa -noout -text -in "%CA_NAME%.key"
openssl rsa -in "%CA_NAME%.key" -out "%CA_NAME%.key.unsecure&quo ...
以上語句都寫入 /etc/rc2.d/S50apache 裡面嗎?
《解決方案》
同上
《解決方案》
這個問題因該很多人都會遇見的拉? 教教我!
《解決方案》
這個東西老重要的。而且老常用的,沒人想知道嗎?幫忙頂一下啦
《解決方案》
天天問,不信沒高人!
《解決方案》
http://w.yi.org/ftp/FAPM/apache/Apache2/zh/ssl/ssl_faq.html
搜索Start
《解決方案》
Here is what I did in apache-2.0.59 on Solaris.
Please let me know if it also works on Apache 2.2.x. Thank you.
1. Create a small script that contains the ssl.crt password:
# pwd
/usr/local/apache-2.0.59/bin
# cat ./sslpasswd
#!/bin/sh
echo testpass
#
# chmod 700 ./sslpasswd
# chown root:root ./sslpasswd
#
2. Change a line of ssl.conf file of Apache:
# cp -p ssl.conf ssl.conf.orig
# vi ssl.conf
"ssl.conf" 291 lines, 11590 characters
68 SSLPassPhraseDialog exec:/usr/local/apache-2.0.59/bin/sslpasswd
69 #SSLPassPhraseDialog builtin
3. Make changes in script /etc/init.d/apache:
# vi apache
...
start|restart)
...
# $HTTPD -k $ARGV
$HTTPD -k start -DSSL
...
#
4. Test it from command line.
# /etc/init.d/apache stop
#
# /etc/init.d/apache start
#
[ 本帖最後由 susbin 於 2006-10-27 00:35 編輯 ]
《解決方案》
我是這樣做的
vi /usr/local/apache2/conf/extra/httpd-ssl.conf
註釋SSLPassPhraseDialog builtin
在後添加
SSLPassPhraseDialog exec:/usr/local/apache2/conf/apache_pass.sh
vi /usr/local/apache2/conf/apache_pass.sh
#!/bin/sh
echo "密碼"
chmod +x /usr/local/apache2/conf/apache_pass.sh