我正在研究Ubuntu 13.10 64位,我使用这种配置从源代码构建了Apache 2.2.17和openSSL 0.9.8b:
当我尝试在没有SSL的情况下启动我的apache时,它可以工作,但是当我尝试使用ssl(在httpd.conf中包含httpd-ssl.conf)时,我收到此错误: 非法指令(核心倾销)
我在 SSLCertificateFile文件行的httpd-ssl.conf中将此错误本地化。 然后我尝试用GDB运行它,这就是我得到的:
编程接收信号SIGILL,非法指令。 PEM_read_bio_X509()中的0x00000000004e7b20 (gdb)其中
PEM_read_bio_X509()中的0 0x00000000004e7b20
SSL_read_X509中的0x0000000000488159( filename = filename @ entry = 0x7fffffffc440“/home/dinou/httpd_build/serveur.cert”,x509 = x509 @ entry = 0x0, cb = cb @ entry = 0x0)在ssl_util_ssl.c:86
ssl_pphrase_Handle中的2 0x0000000000480c9d(s = s @ entry = 0x85af78, p = p @ entry = 0x88c368)ssl_engine_pphrase.c:206
ssl_init_Module中的3 0x000000000047ad20(p = 0x846138,plog =, ptemp = 0x88c368,base_server = 0x85af78)ssl_engine_init.c:290
ap_run_post_config中的4 0x0000000000461569(pconf = 0x846138,plog = 0x88a358, ptemp = 0x88c368,s = 0x85af78)在config.c:91
在main.c中,5 0x000000000044e29b(argc = 1,argv = 0x7fffffffe6e8):679
我确认我的证书是PEM格式,没关系。
任何想法? 感谢
编辑:这是构建和创建的脚本。安装所有
#!/bin/bash
#OPENSSL_VERSION="0.9.8b"
#HTTPD_VERSION="2.2.17"
check_errs()
{
if [ "${1}" -ne "0" ]; then
echo "ERROR # ${1} : ${2}" 1>&2;
exit ${1}
fi
}
WORKDIR=`mktemp -d`
check_errs $? "temp dir creation"
echo "WORKDIR=$WORKDIR"
cd $WORKDIR
wget http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
check_errs $? "wget openssl $OPENSSL_VERSION ;; in $WORKDIR"
tar zxf openssl-$OPENSSL_VERSION.tar.gz
check_errs $? "untar openssl $OPENSSL_VERSION ;; in $WORKDIR"
cd openssl-$OPENSSL_VERSION
check_errs $? "cd openssl $OPENSSL_VERSION ;; in $WORKDIR"
./config \
--prefix=$WORKDIR/ssl \
--openssldir=$WORKDIR/ssl \
no-asm
check_errs $? "config openssl $OPENSSL_VERSION ;; in $WORKDIR"
make
check_errs $? "make openssl $OPENSSL_VERSION ;; in $WORKDIR"
make install
check_errs $? "make install openssl $OPENSSL_VERSION ;; in $WORKDIR"
cd $WORKDIR
wget http://mir2.ovh.net/ftp.apache.org/dist//httpd/httpd-$HTTPD_VERSION.tar.gz
check_errs $? "wget httpd-$HTTPD_VERSION ;; in $WORKDIR"
tar zxf httpd-$HTTPD_VERSION.tar.gz
check_errs $? "untar httpd-$HTTPD_VERSION ;; in $WORKDIR"
cd httpd-$HTTPD_VERSION
check_errs $? "cd httpd-$HTTPD_VERSION ;; in $WORKDIR"
./configure \
--prefix=$WORKDIR/apache \
--with-included-apr \
--enable-ssl \
--with-ssl=$WORKDIR/ssl \
--enable-ssl-staticlib-deps \
--enable-mods-static=ssl
check_errs $? "configure httpd-$HTTPD_VERSION ;; in $WORKDIR"
make
check_errs $? "make httpd-$HTTPD_VERSION ;; in $WORKDIR"
make install
check_errs $? "make install httpd-$HTTPD_VERSION ;; in $WORKDIR"
cd $WORKDIR/apache/conf
check_errs $? "cd apache ;; in $WORKDIR"
$WORKDIR/ssl/bin/openssl req -x509 -out server.crt -keyout server.key -days 900 -newkey rsa:1024 -subj '/CN=localhost' -nodes
check_errs $? "key generation ;; in $WORKDIR"
echo "SSLEngine On" >>httpd.conf
echo "SSLCertificateFile conf/server.crt" >>httpd.conf
echo "SSLCertificateKeyFile conf/server.key" >>httpd.conf
sed -i 's/Listen \*:80/Listen *:8443/' ports.conf
check_errs $? "sed ;; in $WORKDIR"