| handsun 回复于:2004-06-03 14:14:11
|
ok
|
| antsnm 回复于:2004-06-03 16:46:22
|
转贴,作为上面文章的补充
Apache安装MOD_SSL的补充--手工签署证书的方法
本文出自:http://www.gouhuo.com 作者: sustomer (2001-07-22 13:05:00)
虽然在安装MOD_SSL时已使用 make certificate 命令建立了服务器
的证书签名,但是有时您可能需要改变他。
当然有很多自动的脚本能够实现他,但是最可靠的方法是手工签署
证书。
首先我假定您已安装好了openssl和MOD_SSL,假如您的openssl安装时
的prefix配置为/usr/local/openssl,那么把/usr/local/openssl/bin加入
执行文档查找路径。还需要MOD_SSL源代码中的一个脚本,他在MOD_SSL的
源代码目录树下的pkg.contrib目录中,文档名为 sign.sh。
将他拷贝到 /usr/local/openssl/bin 中。
先建立一个 CA 的证书,
首先为 CA 创建一个 RSA 私用密钥,
[S-1]
openssl genrsa -des3 -out ca.key 1024
系统提示输入 PEM pass phrase,也就是密码,输入后牢记他。
生成 ca.key 文档,将文档属性改为400,并放在安全的地方。
[S-2]
chmod 400 ca.key
您能够用下列命令查看他的内容,
[S-3]
openssl rsa -noout -text -in ca.key
利用 CA 的 RSA 密钥创建一个自签署的 CA 证书(X.509结构)
[S-4]
openssl req -new -x509 -days 3650 -key ca.key -out ca.crt
然后需要输入下列信息:
Country Name: cn 两个字母的国家代号
State or Province Name: An Hui 省份名称
Locality Name: Bengbu 城市名称
Organization Name: Family Network 公司名称
Organizational Unit Name: Home 部门名称
Common Name: Chen Yang 您的姓名
Email Address: sunstorm@263.net Email地址
生成 ca.crt 文档,将文档属性改为400,并放在安全的地方。
[S-5]
chmod 400 ca.crt
您能够用下列命令查看他的内容,
[S-6]
openssl x509 -noout -text -in ca.crt
下面要创建服务器证书签署请求,
首先为您的 Apache 创建一个 RSA 私用密钥:
[S-7]
openssl genrsa -des3 -out server.key 1024
这里也要设定pass phrase。
生成 server.key 文档,将文档属性改为400,并放在安全的地方。
[S-8]
chmod 400 server.key
您能够用下列命令查看他的内容,
[S-9]
openssl rsa -noout -text -in server.key
用 server.key 生成证书签署请求 CSR.
[S-10]
openssl req -new -key server.key -out server.csr
这里也要输入一些信息,和[S-4]中的内容类似。
至于 ’extra’ attributes 不用输入。
您能够查看 CSR 的细节
[S-11]
openssl req -noout -text -in server.csr
下面能够签署证书了,需要用到脚本 sign.sh
[S-12]
sign.sh server.csr
就能够得到server.crt。
将文档属性改为400,并放在安全的地方。
[S-13]
chmod 400 server.crt
删除CSR
[S-14]
rm server.csr
最后apache配置
假如您的apache编译参数prefix为/usr/local/apache,
那么拷贝server.crt 和 server.key 到 /usr/local/apache/conf
修改httpd.conf
将下面的参数改为:
SSLCertificateFILE /usr/local/apache/conf/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/server.key
能够 apachectl startssl 试一下了。
在我安装的时候没有注意到,我已安装了OPENSSL是REDHAT的RPM包,具体怎样编译网上很多资料,自己查一下好了!
|
| zjnet1 回复于:2004-06-03 20:13:51
|
--with-apxs2=/usr/local/apache2/bin/apxs 的意思是说指定使用apache2的模块编译应用程式来编译php模块。
|
| jdx17 回复于:2004-06-05 09:45:23
|
mysql ?u root ?p (看看是否能登陆,需要输入密码)
我输入root密码
登陆不了
|
| jdx17 回复于:2004-06-05 09:59:51
|
cp index.html.zh-cn.gb2312 index.html
什么意思啊
我根据您的做根本就不行
|
| jdx17 回复于:2004-06-05 10:06:49
|
上面的/usr/local/apache2 下根本没有htdoc文档
|
| llzqq 回复于:2004-06-05 10:52:48
|
[quote:dc0fa02afd="jdx17"]上面的/usr/local/apache2 下根本没有htdoc文档[/quote:dc0fa02afd]
应该是htdocs文档夹
|
| llzqq 回复于:2004-06-05 10:53:45
|
[quote:7a0955af48="jdx17"]mysql ?u root ?p (看看是否能登陆,需要输入密码)
我输入root密码
登陆不了[/quote:7a0955af48]
在需要输入密码时直接回车就能够了
|
| antsnm 回复于:2004-06-06 15:00:31
|
我也是菜鸟,我只是把自己的配置过程写下来,我就是通过这样的配置过程将我的系统配置好了,而且已能够提供ssl的加密传输,您不能成功可能有很多原因,造作系统不相同,我用的是REDHAT8.0,安装的apache版本完全相同吗?
cp index.html.zh-cn.gb2312 index.html,您的apache默认显示的是index.html这个页面吗?htdocs目录下没有这个文档,默认显示的是英文的,这样做就是将这个测试页面替换成中文的.
|
| 风暴一族 回复于:2004-06-09 17:37:49
|
安装目录能够更改吗?
我自己在/etc/httpd下创建了一个目录安装
|
| 风暴一族 回复于:2004-06-09 17:50:25
|
1.MySQL-client-4.0.20-0.i386.rpm 2. MySQL-server-4.0.20-0.i386.rpm
3. httpd-2.0.49.tar.gz 4. php-4.3.6.tar.gz
能提供这四个软件的下载地址吗?
十分感谢!
|
| 成天不吃饭 回复于:2004-06-10 03:20:33
|
http://www.apache.org
这个站点的文档想看明白,着实不易!
|
| firemen 回复于:2004-06-11 17:13:14
|
请问一下 以前的 Phpadmin 还管用吗 ??
|
| antsnm 回复于:2004-06-13 00:25:37
|
MySQL的下载地址:
http://www.mysql.com
Apache的下载地址:
http://www.apache.org
都是官方网站,要的东西有!! 英文不好就找download,我也很菜! :)
能够更改安装目录,但是其他地方别忘了也用您的目录就好了
|
| fire9 回复于:2004-06-17 11:52:19
|
有碰到过吗?

| ?
| | Ares.K 回复于:2004-06-21 18:58:35
| 我按照楼主的操作步骤完成
没有出错
为啥浏览php页面的时候还是出现TXT的内容?
| | jackylau 回复于:2004-06-23 10:38:08
| [quote:ddcce01ab1="fire9"]有碰到过吗?[/quote:ddcce01ab1]
这个不是错误,您把
/usr/local/apache/conf/httpd.conf里的ServerName 后面的那个东东改成127.0.0.1就好了。
| | qintel 回复于:2004-06-23 12:23:31
| [quote:274059fe2b="Ares.K"]我按照楼主的操作步骤完成
没有出错
为啥浏览php页面的时候还是出现TXT的内容?[/quote:274059fe2b]
我也出现这个问题,关注中,高手来帮帮忙啊 :em13: :em02:
| | keelort 回复于:2004-07-08 12:07:16
| [quote:cd86ae3e5f="fire9"]有碰到过吗?[/quote:cd86ae3e5f]
没有配置默认服务器名,自动配置为127.0.0.1
| | someday 回复于:2004-08-02 22:14:47
| 老大 我安装时出现下面的情况轻指点,先谢了!!!
[root@localhost httpd-2.0.49]# ./configure --prefix=/usr/local/apache2 --enable-so --enable-ssl
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
Configuring Apache Portable Runtime library ...
checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
Configuring APR library
Platform: i686-pc-linux-gnu
checking for working mkdir -p... yes
APR Version: 0.9.5
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details.
configure failed for srclib/apr
:em12:
|
|
还没有关于此文章的相关评论!
主机赞助商连接:
华夏名网虚拟主机域名注册
关于我们 | 网站声明 | 联系我们 | 广告服务 IDC中文资讯站-客观公证的IDC产业权威媒体
|