[root@www .sslkey]# openssl genrsa -out server.key 1024
Generating RSA private key, 1024 bit long modulus
.........++++++
.......................++++++
e is 65537 (0x10001)
[root@www .sslkey]# openssl req -new -x509 -key server.key -out server.crt
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:CN 中国
State or Province Name (full name) [Berkshire]:guangzhou 广州
Locality Name (eg, city) [Newbury]:dongguan 东莞
Organization Name (eg, company) [My Company Ltd]:mange 公司名
Organizational Unit Name (eg, section) []:mange 单位名
Common Name (eg, your name or your server's hostname) []:www.huge.com您的网站名
Email Address []:[email protected] 邮件地址
[root@www .sslkey]# chmod -R 400 /etc/httpd/.sslkey/
[root@www .sslkey]# service httpd restart
��姝� httpd锛� [澶辫触]
���� httpd锛� [纭�瀹�]
[root@www .sslkey]# vi /etc/httpd/conf/httpd.conf
[root@www .sslkey]# mkdir /var/v
[root@www .sslkey]# cat >>/var/v/i.html
aaaaaaaaaaaaaaaaaaaaaa