歡迎您光臨本站 註冊首頁

怎麼在Apache虛擬目錄里添加openssl證書,實現https訪問.

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

怎麼在Apache虛擬目錄里添加openssl證書,實現https訪問.

我要崩潰了.只能在全局裡用https訪問.但是到虛擬目錄里就不行.
用的OPENssl做的證書.證書沒有問題.就是不知道怎麼在虛擬目錄里訪問HTTPS.
上傳一下我的配置.#Listen 12.34.56.78:80
Listen 80
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/
    Directoryindex index.html
    ServerName www.serah.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>這就是我做的Apache的虛擬站點配置.

------------------------------------------------------------------------------------------------------------------------------------------------------
用http可以正確訪問

==============================================================================================
用https訪問.


--------------------------------------------------------------------------------------------------------------------------------------------------------
不知道這是為什麼..
我也知道這兩天我問題非常多非常多.我自己都看不下去了..但是實在不會.大家多包涵.多謝謝謝.....
《解決方案》

本帖最後由 奔跑的糖葫蘆 於 2012-06-16 09:00 編輯

問題解決了..
原來是埠的問題.
NameVirtualHost *:443
<VirtualHost *:443>
改為上面的這樣才能正確用HTTPS訪問.
而且必須是所有地址.不能在*號部分寫入監聽某個IP.否則也訪問不成功.
唉.困擾一天半的問題..原來就是個埠...
《解決方案》

https就是443埠,你沒啟用
《解決方案》

回復 3# chenyx

早上才想到這個問題..改回443就成功了.
解決了
   

[火星人 ] 怎麼在Apache虛擬目錄里添加openssl證書,實現https訪問.已經有866次圍觀

http://coctec.com/docs/service/show-post-12746.html