Apache2-httpd-ssl加密认证配置
2009-08-09 20:54
260 查看
Apache2-httpd-ssl加密认证配置
1.配置编译选项
tar -jxvf httpd-2.0.59.tar.bz2
cd httpd-2.0.59
./configure --enable-ssl --enable-so --enable-rewrite --enable-mime-magic --with-included-apr
2.编译安装
make && make install
3.ssl加密的配置
cd /usr/local/apache2/conf
在httpd.conf中,将ssl模块开启 # Include conf/extra/httpd-ssl.conf (#去掉即可)
mkdir -p /usr/local/apache2/conf/ssl.key
1).创建服务器RSA私钥
openssl genrsa -des3 -out /usr/local/apache2/conf/ssl.key/server.key 1024
-des3可以不加,加上的话要输入密码,使得自启时非交互的变成了交互式的,在这里不采
用,去掉-des3
2).创建证书签署请示(CSR)
cd ssl.key;openssl req -new -key server.key -out server.csr
3).使用RSA私钥创建一个自签署的X509证书请求
openssl req -x509 -days 365 -key server.key -in server.csr -out server.crt
4.修改/usr/local/apache2/conf/extra/httpd-ssl.conf文件,由于上面创建的密钥证书都放在了自建的ssl.key中,需要修改配置文件中的路径,修改如下:
SSLCertificateFile "/usr/local/apache2/conf/ssl.key/server.crt"
SSLCertificateKeyFile "/usr/local/apache2/conf/ssl.key/server.key"
修改这两行即可
5./usr/local/apache2/bin/httpd -S (验证是否成功)
6./usr/local/apache2/bin/httpd -k start
启动httpd
lsof -i :80 ; lsof -i :443查看服务是否启动
7.访问 http://10.1.1.199 或 https://10.1.1.199
本文出自 “理想CTO” 博客,谢绝转载!
1.配置编译选项
tar -jxvf httpd-2.0.59.tar.bz2
cd httpd-2.0.59
./configure --enable-ssl --enable-so --enable-rewrite --enable-mime-magic --with-included-apr
2.编译安装
make && make install
3.ssl加密的配置
cd /usr/local/apache2/conf
在httpd.conf中,将ssl模块开启 # Include conf/extra/httpd-ssl.conf (#去掉即可)
mkdir -p /usr/local/apache2/conf/ssl.key
1).创建服务器RSA私钥
openssl genrsa -des3 -out /usr/local/apache2/conf/ssl.key/server.key 1024
-des3可以不加,加上的话要输入密码,使得自启时非交互的变成了交互式的,在这里不采
用,去掉-des3
2).创建证书签署请示(CSR)
cd ssl.key;openssl req -new -key server.key -out server.csr
3).使用RSA私钥创建一个自签署的X509证书请求
openssl req -x509 -days 365 -key server.key -in server.csr -out server.crt
4.修改/usr/local/apache2/conf/extra/httpd-ssl.conf文件,由于上面创建的密钥证书都放在了自建的ssl.key中,需要修改配置文件中的路径,修改如下:
SSLCertificateFile "/usr/local/apache2/conf/ssl.key/server.crt"
SSLCertificateKeyFile "/usr/local/apache2/conf/ssl.key/server.key"
修改这两行即可
5./usr/local/apache2/bin/httpd -S (验证是否成功)
6./usr/local/apache2/bin/httpd -k start
启动httpd
lsof -i :80 ; lsof -i :443查看服务是否启动
7.访问 http://10.1.1.199 或 https://10.1.1.199
本文出自 “理想CTO” 博客,谢绝转载!
相关文章推荐
- nginx配置ssl加密(单双向认证、部分https)
- nginx配置ssl加密(单双向认证、部分https)
- nginx配置ssl加密(单双向认证、部分https)
- CentOS6.5基于AD域账号联动认证的vsftpd结合SSL加密服务器配置
- nginx配置ssl加密(单双向认证、部分https)
- Nginx配置ssl加密(单双向认证、部分https)
- wamp server 配置ssl加密认证
- nginx环境下配置ssl加密(单双向认证、部分https)
- nginx配置ssl加密(单双向认证、部分https)
- nginx配置ssl加密(单/双向认证、部分https)
- Nginx配置ssl加密(单双向认证、部分https)
- keytool生成keystore、truststore、证书以及SSL单向认证在服务端tomcat和客户端的配置
- Apache Httpd 2.2 配置CA证书,实现Https加密通讯
- Centos6.3下Apache配置基于加密的认证https加密证书访问
- Ubuntu下使用openssl为apache2配置ssl
- 从http到https简介,tomcat和nginx的https配置,单向认证和双向认证简介,对称加密和非对称加密简介,RSA算法简介
- Apache2 httpd.conf配置文件中文版详解
- apache2 配置ssl
- nginx支持ssl双向认证配置