一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務器之家:專注于服務器技術及軟件下載分享
分類導航

Linux|Centos|Ubuntu|系統進程|Fedora|注冊表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務器之家 - 服務器系統 - Centos - Centos6.3下Apache配置基于加密的認證https加密證書訪問

Centos6.3下Apache配置基于加密的認證https加密證書訪問

2019-10-06 21:08Centos教程網 Centos

Centos6.3下Apache配置https證書訪問 這里簡單演示一下Apache下基于加密的認證訪問—-https加密方式訪問,希望對朋友們有幫助。

這里簡單演示一下Apache下基于加密的認證訪問----https加密方式訪問。

1.DNS解析解析情況:

[root@localhost html]# nslookup m.ythuaji.com.cn

Server:         192.168.2.115

Address:        192.168.2.115#53

Name:   m.ythuaji.com.cn

Address: 192.168.2.115

2.安裝Apache SSL支持模塊:# yum install -y mod_ssl (默認yum安裝httpd是沒有安裝該模塊的,安裝后自動生產/etc/httpd/conf.d/ssl.conf文件)并生成證書。

[root@localhost certs]# pwd

/etc/pki/tls/certs

[root@localhost certs]# ls

ca-bundle.crt        index.html      localhost.crt    Makefile

ca-bundle.trust.crt  localhost1.crt  make-dummy-cert

[root@localhost certs]# openssl req -utf8 -new -key ../private/localhost.key -x509 -days 3650 -out abc_com.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) [XX]:CN

State or Province Name (full name) []:510510

Locality Name (eg, city) [Default City]:GZ

Organization Name (eg, company) [Default Company Ltd]:ABC.COM

Organizational Unit Name (eg, section) []:Mr.Zhang

Common Name (eg, your name or your server's hostname) []:m.ythuaji.com.cn

Email Address []:[email protected]

[root@localhost certs]#

3.配置Apache,基本配置這里不多說了,下面是配置m.ythuaji.com.cn站點http訪問的情況。

[root@localhost html]# tail -n 8 /etc/httpd/conf/httpd.conf

NameVirtualhost 192.168.2.115:80

<VirtualHost m.ythuaji.com.cn:80>

    ServerAdmin [email protected]

    DocumentRoot /var/www/html

    ServerName m.ythuaji.com.cn

    ErrorLog logs/dummy-host.example.com-error_log

    CustomLog logs/dummy-host.example.com-access_log common

</VirtualHost>

[root@localhost html]# tail /var/www/html/index.html                      

m.ythuaji.com.cn

[root@localhost html]#

4.配置Apache支持https訪問m.ythuaji.com.cn站點,編輯 vim /etc/httpd/conf.d/ssl.conf 文件,制定m.ythuaji.com.cn站點https訪問時的相關信息。添加下面配置。

<VirtualHost m.ythuaji.com.cn:443>

DocumentRoot "/var/www/html/www.kuteatest.net"    #//為了顯示效果,這里的站點目錄不一樣,一般情況一個域名應該指向同一目錄的。

ServerName m.ythuaji.com.cn:443

ErrorLog logs/ssl_error_log

TransferLog logs/ssl_access_log

LogLevel warn

SSLEngine on

SSLProtocol all -SSLv2

SSLCipherSuite ALL:!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>

SetEnvIf User-Agent ".*MSIE.*" \

         nokeepalive ssl-unclean-shutdown \

         downgrade-1.0 force-response-1.0

CustomLog logs/ssl_request_log \

          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

5.重啟Apache服務,測試訪問。

Centos6.3下Apache配置基于加密的認證https加密證書訪問

測試http訪問的結果

Centos6.3下Apache配置基于加密的認證https加密證書訪問

測試https訪問的結果

Centos6.3下Apache配置基于加密的認證https加密證書訪問

查看證書信息和自建crt信息一致

Centos6.3下Apache配置基于加密的認證https加密證書訪問

https訪問的最終結果

延伸 · 閱讀

精彩推薦
  • Centoscentos 安裝與操作方法

    centos 安裝與操作方法

    這篇文章主要介紹了centos 安裝與操作方法,需要的朋友可以參考下...

    centos之家5272019-07-11
  • CentosCentos7運用/dev/shm進行網站優化

    Centos7運用/dev/shm進行網站優化

    這篇文章主要介紹了LINUX中Centos7運用/dev/shm進行網站優化相關知識點,對此有興趣的朋友參考學習下。...

    彬菌9912022-03-02
  • CentosCentOS下Uptime命令詳解

    CentOS下Uptime命令詳解

    在Linux下,我們可以使用uptime命令,而且此命令不必使用root權限。uptime命令在系統中已經默認安裝了。今天小編為大家帶來的是CentOS下Uptime命令詳解;希望...

    CentOS之家11482019-06-19
  • Centoscentos不小心刪除/root目錄該如何解決?

    centos不小心刪除/root目錄該如何解決?

    一些朋友最近在問小編centos不小心刪除/root目錄該如何解決?今天小編就為大家分享centos不小心刪除/root目錄解決辦法;希望對大家會有幫助,有需要的朋友...

    腳本之家8022019-05-29
  • CentosCentOS6.5下Redis安裝與配置詳細步驟

    CentOS6.5下Redis安裝與配置詳細步驟

    本篇文章主要介紹了CentOS6.5下Redis安裝與配置詳細步驟,詳細介紹redis單機單實例安裝與配置,服務及開機自啟動。有興趣的可以了解一下。...

    飛流11452021-12-24
  • CentosCentos 7開啟網卡自動獲取IP的詳細方法

    Centos 7開啟網卡自動獲取IP的詳細方法

    本篇文章主要介紹了Centos 7開啟網卡自動獲取IP的詳細方法,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧...

    凌鋒8972021-12-29
  • CentosCentOS 6.6實現永久修改DNS地址的方法

    CentOS 6.6實現永久修改DNS地址的方法

    這篇文章主要介紹了CentOS 6.6實現永久修改DNS地址的方法,涉及針對CentOS配置文件的相關設置技巧,具有一定參考借鑒價值,需要的朋友可以參考下 ...

    Linux社區4472020-08-21
  • CentosCentOS7設置日期和時間方法以及基本概念介紹

    CentOS7設置日期和時間方法以及基本概念介紹

    這篇文章主要介紹了CentOS7設置日期和時間方法以及基本概念介紹,本文講解使用CentOS7中的新命令timedatectl設置日期時間方法,需要的朋友可以參考下 ...

    CentOS之家6522019-09-19
主站蜘蛛池模板: 国产精视频 | 美女无内裤下部黄 | 2022色婷婷综合久久久 | 亚洲人成网站在线观看90影院 | 成人免费观看在线视频 | 成年视频在线观看免费 | 亚洲国产精品成人午夜在线观看 | 亚洲精品中文 | 清纯唯美 亚洲 | 亚洲男gay | 无遮掩60分钟从头啪到尾 | 美女私人影院 | 色狠狠成人综合网 | 19+韩国女主播激情vip视频在线 | 国产精品资源在线观看网站 | 福利一区二区在线观看 | 日韩伦理在线观看 | 欧美日韩第二页 | 俄罗斯12一15处交 | chinesemature丰满成熟 | 成人亚洲欧美日韩中文字幕 | 国产成人综合亚洲一区 | 精品suv一区二区三区 | 午夜毛片在线观看 | 免费特黄一级欧美大片 | 楚乔传第二部免费观看全集完整版 | 99国内精品久久久久久久黑人 | 日本不卡在线一区二区三区视频 | 成人精品免费网站 | 亚洲精品一区二区三区中文字幕 | 被黑人同学彻底征服全文小说阅读 | 紧身短裙女教师波多野 | 涩涩屋视频在线观看 | 经典千人斩一区二区视频 | 色综合天天综合网看在线影院 | 久久中文字幕免费高清 | 非洲黑人又大粗gay 非洲黑人bbwbbwbbw | 亚洲AV无码国产精品午夜久久 | 久久日韩精品无码一区 | 大又大又黄又爽免费毛片 | 农村老妇1乱69系列小说 |