[root@localhosthtml]#nslookupwww.abc.com
Server:192.168.2.115
Address:192.168.2.115#53
Name:www.abc.com
Address:192.168.2.115
[root@localhostcerts]#pwd
/etc/pki/tls/certs
[root@localhostcerts]#ls
ca-bundle.crtindex.htmllocalhost.crtMakefile
ca-bundle.trust.crtlocalhost1.crtmake-dummy-cert
[root@localhostcerts]#opensslreq-utf8-new-key../private/localhost.key-x509-days3650-outabc_com.crt
Youareabouttobeaskedtoenterinformationthatwillbeincorporated
intoyourcertificaterequest.
WhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraDN.
Therearequiteafewfieldsbutyoucanleavesomeblank
Forsomefieldstherewillbeadefaultvalue,
Ifyouenter‘.’,thefieldwillbeleftblank.
―C
CountryName(2lettercode)[XX]:CN
StateorProvinceName(fullname)[]:510510
LocalityName(eg,city)[DefaultCity]:GZ
OrganizationName(eg,company)[DefaultCompanyLtd]:ABC.COM
OrganizationalUnitName(eg,section)[]:Mr.Zhang
CommonName(eg,yournameoryourserver’shostname)[]:www.abc.com
EmailAddress[]:root@abc.com
[root@localhostcerts]#
[root@localhosthtml]#tail-n8/etc/httpd/conf/httpd.conf
NameVirtualhost192.168.2.115:80
<VirtualHostwww.abc.com:80>
ServerAdminwebmaster@dummy-host.example.com
DocumentRoot/var/www/html
ServerNamewww.abc.com
ErrorLoglogs/dummy-host.example.com-error_log
CustomLoglogs/dummy-host.example.com-access_logcommon
</VirtualHost>
[root@localhosthtml]#tail/var/www/html/index.html
www.abc.com
[root@localhosthtml]#
<VirtualHostwww.abc.com:443>
DocumentRoot“/var/www/html/www.kuteatest.net”#//为了显现效果,这里的站点目次纷歧样,一样平常情形一个域名应当指向统一目次的。
ServerNamewww.abc.com:443
ErrorLoglogs/ssl_error_log
TransferLoglogs/ssl_access_log
LogLevelwarn
SSLEngineon
SSLProtocolall-SSLv2
SSLCipherSuiteALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile/etc/pki/tls/certs/abc_com.crt
SSLCertificateKeyFile/etc/pki/tls/private/localhost.key
<Files~“.(cgi|shtml|phtml|php3?)$”>
SSLOptions+StdEnvVars
</Files>
<Directory“/var/www/cgi-bin”>
SSLOptions+StdEnvVars
</Directory>
SetEnvIfUser-Agent“.*MSIE.*”
nokeepalivessl-unclean-shutdown
downgrade-1.0force-response-1.0
CustomLoglogs/ssl_request_log
“%t%h%{SSL_PROTOCOL}x%{SSL_CIPHER}x”%r”%b”
</VirtualHost>
欢迎光临 仓酷云 (http://ckuyun.com/) | Powered by Discuz! X3.2 |