亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 網站 > Apache > 正文

APACHE 服務器 搭建HTTPS網站教程

2024-08-27 18:27:03
字體:
來源:轉載
供稿:網友
由于百度和谷歌等搜索引擎提倡開啟HTTPS安全傳輸的鏈接方式。錯新源碼網近日也做了HTTPS鏈接方式。錯新源碼網采用的是upupw
apache版的服務器軟件。那么今天分享一下upupw apache版的服務器軟件如何開啟HTTPS鏈接。廢話不多說,直接上教程。。。。
 
 首先到這里下在upupw apache服務器套件https://down.vevb.com/software/33477.html
 然后解壓到您指定的分區里面比如D:/UPUPW/
 
 第一步:
 復制UPUPW目錄下面/Apache2/bin/目錄下面的 libeay32.dll,openssl.exe,ssleay32.dll這三個文件到您的PHP目錄里。
 注:原版的UPUPW APACHE版的服務器套件,不論您怎么配置,即使您配置的都正確如果不復制這三個文件也啟動不了Apache服務。所以這三個文件目前為止必須復制到PHP目錄替換PHP目錄里面的相同文件名的文件。
 
 第二步:
 上面的三個文件復制好之后
 
 打開Apache2/conf/目錄下面的httpd.conf文件
 
 找到這兩行
 #LoadModule ssl_module modules/mod_ssl.so
 #Include conf/extra/httpd-ssl.conf
 
 去掉前面的#號,修改成
 LoadModule ssl_module modules/mod_ssl.so
 Include conf/extra/httpd-ssl.conf
 
 需要注意的是下面這兩行代碼
 Listen 80
 Include conf/httpd-listen.conf
 
 如果這兩行代碼前面有#也請去掉。
 
 然后保存
 
 第三步
 然后在打開Apache2/conf/目錄下面的httpd-listen.conf文件
 
 您會看到這樣的文字
 #Listen 81
 #Listen 8080
 
 我們增加一行代碼
 listen 443
 變成
 #Listen 81
 #Listen 8080
 listen 443
 
 解釋一下,#listen 81和#listen 8080不在服務器端口檢測中
 增加listen 443是為了讓服務器對443端口進行檢測和鏈接
 如果您不開啟443端口的檢測即使您配置正確HTTPS也不能鏈接
 
 修改好之后后保存
 
 第四步
 接下來我們在打開Apache2/conf/extra目錄下面的httpd-ssl.conf文件
 
 #
 # This is the Apache server configuration file providing SSL support.
 # It contains the configuration directives to instruct the server how to
 # serve pages over an https connection. For detailed information about these
 # directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
 #
 # Do NOT simply read the instructions in here without understanding
 # what they do.  They're here only as hints or reminders.  If you are unsure
 # consult the online docs. You have been warned.  
 #
 # Required modules: mod_log_config, mod_setenvif, mod_ssl,
 #          socache_shmcb_module (for default value of SSLSessionCache)
 
 #
 # Pseudo Random Number Generator (PRNG):
 # Configure one or more sources to seed the PRNG of the SSL library.
 # The seed data should be of good random quality.
 # WARNING! On some platforms /dev/random blocks if not enough entropy
 # is available. This means you then cannot use the /dev/random device
 # because it would lead to very long connection times (as long as
 # it requires to make more entropy available). But usually those
 # platforms additionally provide a /dev/urandom device which doesn't
 # block. So, if available, use this one instead. Read the mod_ssl User
 # Manual for more details.
 #
 #SSLRandomSeed startup file:/dev/random  512
 #SSLRandomSeed startup file:/dev/urandom 512
 #SSLRandomSeed connect file:/dev/random  512
 #SSLRandomSeed connect file:/dev/urandom 512
 
 
 #
 # When we also provide SSL we have to listen to the
 # standard HTTP port (see above) and to the HTTPS port
 #
 Listen 443
 
 #   SSL Cipher Suite:
 #   List the ciphers that the client is permitted to negotiate.
 #   See the mod_ssl documentation for a complete list.
 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
 
 #   Speed-optimized SSL Cipher configuration:
 #   If speed is your main concern (on busy HTTPS servers e.g.),
 #   you might want to force clients to specific, performance
 #   optimized ciphers. In this case, prepend those ciphers
 #   to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
 #   Caveat: by giving precedence to RC4-SHA and AES128-SHA
 #   (as in the example below), most connections will no longer
 #   have perfect forward secrecy - if the server's key is
 #   compromised, captures of past or future traffic must be
 #   considered compromised, too.
 #SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
 #SSLHonorCipherOrder on
 
 #   Pass Phrase Dialog:
 #   Configure the pass phrase gathering process.
 #   The filtering dialog program (`builtin' is an internal
 #   terminal dialog) has to provide the pass phrase on stdout.
 SSLPassPhraseDialog  builtin
 
 #   Inter-Process Session Cache:
 #   Configure the SSL Session Cache: First the mechanism
 #   to use and second the expiring timeout (in seconds).
 #SSLSessionCache         "dbm:logs/ssl_scache"
 SSLSessionCache        "shmcb:logs/ssl_scache(512000)"
 SSLSessionCacheTimeout  300
 
 <VirtualHost _default_:443>
     DocumentRoot "sslroot/"
     ServerName www.example.com:443
     ServerAlias example.com
     ServerAdmin webmaster@example.com
     DirectoryIndex index.html index.htm index.php default.php app.php u.php
     ErrorLog logs/example_error.log
     CustomLog logs/example_access.log /
     "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x /"%r/" %b"
     SSLEngine on
     SSLCertificateFile "conf/server.crt"
     SSLCertificateKeyFile "conf/server.key"
 <FilesMatch "/.(shtml|phtml|php)$">
     SSLOptions +StdEnvVars
 </FilesMatch>
     BrowserMatch "MSIE [2-5]" /
     nokeepalive ssl-unclean-shutdown /
     downgrade-1.0 force-response-1.0
 </VirtualHost>
 
 這是原版的httpd-ssl.conf文件內容   上面有個Listen 443對443端口檢測的代碼  我們把這段代碼刪除了  
 如果您不想刪除這段代碼那么httpd-listen.conf這個文件中的對443端口進行檢測的代碼也必須注釋掉 在前面增加#號。。。
 如果是原版的httpd-listen.conf文件  我們不需要做第三步的修改。。。
 
 
 接下來我們增加HTTPS鏈接的主機:修改這段代碼
 
 <VirtualHost _default_:443>
     DocumentRoot "sslroot/"
     ServerName www.example.com:443
     ServerAlias example.com
     ServerAdmin webmaster@example.com
     DirectoryIndex index.html index.htm index.php default.php app.php u.php
     ErrorLog logs/example_error.log
     CustomLog logs/example_access.log /
     "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x /"%r/" %b"
     SSLEngine on
     SSLCertificateFile "conf/server.crt"
     SSLCertificateKeyFile "conf/server.key"
 <FilesMatch "/.(shtml|phtml|php)$">
     SSLOptions +StdEnvVars
 </FilesMatch>
     BrowserMatch "MSIE [2-5]" /
     nokeepalive ssl-unclean-shutdown /
     downgrade-1.0 force-response-1.0
 </VirtualHost>
 
 修改成:
 NameVirtualHost *:443
 SSLStrictSNIVHostCheck off
 <VirtualHost _default_:443>
     DocumentRoot "D:/web/"  (注:D:/web/這是您的網站目錄。修改成您的網站目錄。必須修改。)
     ServerName www.49028c.com:443  (注:www.49028c.com:443這是您的網站域名。修改成您的網站域名。)
     ServerAlias www.49028c.com  (注:www.49028c.com:443這是您的網站域名。修改成您的網站域名。必須修改。)
 ServerAdmin admin@vevb.com  (注:admin@vevb.com這是您的網站管理員郵箱。修改成您的網站管理員郵箱。可以不修改。)
 SSLEngine on
 SSLProtocol all -SSLv2
 SSLCipherSuite ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!aNULL:!eNULL
 SSLCertificateFile "D:/UPUPW_AP/Apache2/conf/Apache/www.crt" (注:www.crt是您申請的Apache版本的SSL證書文件和目錄結構??梢孕薷哪夸浗Y構和證書文件名。文件名要求越短越好)
 SSLCertificateKeyFile "D:/UPUPW_AP/Apache2/conf/Apache/www.key"
(注:www.key是您申請的Apache版本的SSL證書密匙文件和目錄結構。可以修改目錄結構和證書密匙文件名。文件名要求越短越好)
 SSLCertificateChainFile
"D:/UPUPW_AP/Apache2/conf/Apache/root_bundle.crt"
(注:root_bundle.crt是您申請的Apache版本的SSL證書文件和目錄結構??梢孕薷哪夸浗Y構和證書文件名。特別注意這個證書文件名root_bundle.crt不可以用www_bundle.crt這樣的文件名。我測試www_bundle.crt這樣的文件名不可以,啟動不了Apache服務。必須是root_bundle.crt或者root_bundle1.crt,root_bundle2.crt這樣的文件名稱)
 <FilesMatch "/.(cgi|shtml|phtml|php)$">
     SSLOptions +StdEnvVars
 </FilesMatch>
 <Directory "D:/web/">  (注:D:/web/這也是您的網站目錄。修改成您的網站目錄)
     Options FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from all
 </Directory>
 </VirtualHost>
 
 以上配置文件中(注:D:/web/這是您的網站目錄。修改成您的網站目錄。必須修改。)這樣的字符和解釋請您在修改好之后全部刪除。否則啟動不了Apache服務。
 修改好之后后保存
 
 以下復制我的httpd-ssl.conf文件內容以供您參考修改:
 #
 # This is the Apache server configuration file providing SSL support.
 # It contains the configuration directives to instruct the server how to
 # serve pages over an https connection. For detailed information about these
 # directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
 #
 # Do NOT simply read the instructions in here without understanding
 # what they do.  They're here only as hints or reminders.  If you are unsure
 # consult the online docs. You have been warned.  
 #
 # Required modules: mod_log_config, mod_setenvif, mod_ssl,
 #          socache_shmcb_module (for default value of SSLSessionCache)
 
 #
 # Pseudo Random Number Generator (PRNG):
 # Configure one or more sources to seed the PRNG of the SSL library.
 # The seed data should be of good random quality.
 # WARNING! On some platforms /dev/random blocks if not enough entropy
 # is available. This means you then cannot use the /dev/random device
 # because it would lead to very long connection times (as long as
 # it requires to make more entropy available). But usually those
 # platforms additionally provide a /dev/urandom device which doesn't
 # block. So, if available, use this one instead. Read the mod_ssl User
 # Manual for more details.
 #
 #SSLRandomSeed startup file:/dev/random  512
 #SSLRandomSeed startup file:/dev/urandom 512
 #SSLRandomSeed connect file:/dev/random  512
 #SSLRandomSeed connect file:/dev/urandom 512
 
 
 #
 # When we also provide SSL we have to listen to the
 # standard HTTP port (see above) and to the HTTPS port
 #
 
 #   SSL Cipher Suite:
 #   List the ciphers that the client is permitted to negotiate.
 #   See the mod_ssl documentation for a complete list.
 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
 
 #   Speed-optimized SSL Cipher configuration:
 #   If speed is your main concern (on busy HTTPS servers e.g.),
 #   you might want to force clients to specific, performance
 #   optimized ciphers. In this case, prepend those ciphers
 #   to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
 #   Caveat: by giving precedence to RC4-SHA and AES128-SHA
 #   (as in the example below), most connections will no longer
 #   have perfect forward secrecy - if the server's key is
 #   compromised, captures of past or future traffic must be
 #   considered compromised, too.
 #SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
 #SSLHonorCipherOrder on
 
 #   Pass Phrase Dialog:
 #   Configure the pass phrase gathering process.
 #   The filtering dialog program (`builtin' is an internal
 #   terminal dialog) has to provide the pass phrase on stdout.
 SSLPassPhraseDialog  builtin
 
 #   Inter-Process Session Cache:
 #   Configure the SSL Session Cache: First the mechanism
 #   to use and second the expiring timeout (in seconds).
 #SSLSessionCache         "dbm:logs/ssl_scache"
 SSLSessionCache        "shmcb:logs/ssl_scache(512000)"
 SSLSessionCacheTimeout  300
 
 NameVirtualHost *:443
 SSLStrictSNIVHostCheck off
 
 #第一個子域名www.49028c.com主機配置
 <VirtualHost _default_:443>
     DocumentRoot "D:/www/"
     ServerName www.49028c.com:443
     ServerAlias www.49028c.com
 ServerAdmin you@example.com
 SSLEngine on
 SSLProtocol all -SSLv2
 SSLCipherSuite ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!aNULL:!eNULL
 SSLCertificateFile "D:/UPUPW_AP/Apache2/conf/Apache/www.crt"
 SSLCertificateKeyFile "D:/UPUPW_AP/Apache2/conf/Apache/www.key"
 SSLCertificateChainFile "D:/UPUPW_AP/Apache2/conf/Apache/root_bundle.crt"
 <FilesMatch "/.(cgi|shtml|phtml|php)$">
     SSLOptions +StdEnvVars
 </FilesMatch>
 <Directory "D:/www/">
     Options FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from all
 </Directory>
 </VirtualHost>
 #第二個以down.vevb.com的主機配置,注意<VirtualHost *:443>這里與第一個主機不同但是和第三個主機相同。
 <VirtualHost *:443>
     DocumentRoot "D:/down"
     ServerName down.vevb.com:443
     ServerAlias down.vevb.com
 ServerAdmin you@example.com
 SSLEngine on
 SSLProtocol all -SSLv2
 SSLCipherSuite ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!aNULL:!eNULL
     SSLCertificateFile "D:/UPUPW_AP/Apache2/conf/down/down.crt"
     SSLCertificateKeyFile "D:/UPUPW_AP/Apache2/conf/down/down.key"
     SSLCertificateChainFile "D:/UPUPW_AP/Apache2/conf/down/root_bundle2.crt"
 <FilesMatch "/.(cgi|shtml|phtml|php)$">
     SSLOptions +StdEnvVars
 </FilesMatch>
 <Directory "D:/down">
     Options FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from all
 </Directory>
 </VirtualHost>
 #第三個以bbs.vevb.com的主機配置,注意<VirtualHost *:443>這里與第一個主機不同但是和第二個主機相同。
 <VirtualHost *:443>
     DocumentRoot "D:/bbs"
     ServerName bbs.vevb.com:443
     ServerAlias bbs.vevb.com
 ServerAdmin you@example.com
 SSLEngine on
 SSLProtocol all -SSLv2
 SSLCipherSuite ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!aNULL:!eNULL
     SSLCertificateFile "D:/UPUPW_AP/Apache2/conf/bbs/bbs.crt"
     SSLCertificateKeyFile "D:/UPUPW_AP/Apache2/conf/bbs/bbs.key"
     SSLCertificateChainFile "D:/UPUPW_AP/Apache2/conf/bbs/root_bundle3.crt"
 <FilesMatch "/.(cgi|shtml|phtml|php)$">
     SSLOptions +StdEnvVars
 </FilesMatch>
 <Directory "D:/bbs">
     Options FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from all
 </Directory>
 </VirtualHost>
 
 復制以上這段代碼到您的httpd-ssl.conf文件中并且修改響應的網站目錄和域名之后就可以使用了。。如果你只有一個主機或者兩個主機可以刪除<VirtualHost *:443>。。。。。</VirtualHost>的內容
 
 同時不論是單主機還是多主機 都可以使用我給出的方法。。。。

按照推理,所有apache服務器都應該符合本教材,只是目錄結構的變化存在差異
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
91精品国产91久久久久久最新| 久久久久久美女| 精品亚洲一区二区三区四区五区| 久热国产精品视频| 992tv成人免费影院| 国产精品wwwwww| 一本一本久久a久久精品牛牛影视| 色悠久久久久综合先锋影音下载| 久久精品国产成人| 国产成人激情小视频| 日韩在线小视频| 国产精品久久久久久婷婷天堂| 国产精品xxxxx| 成人免费在线视频网址| 久久久久久91| 欧美人在线观看| 日韩69视频在线观看| 亚洲国产精品久久久久久| 色婷婷av一区二区三区久久| 精品久久久香蕉免费精品视频| 97**国产露脸精品国产| 欧美精品videossex88| 亚洲成人激情在线| 亚洲综合色激情五月| 久久精品国产69国产精品亚洲| 国产精品69久久| 97在线看免费观看视频在线观看| 在线精品视频视频中文字幕| 高潮白浆女日韩av免费看| 欧美小视频在线观看| 国产日韩欧美在线| 成人精品视频在线| 亚洲精品免费一区二区三区| 欧美日韩国产中文精品字幕自在自线| 国产盗摄xxxx视频xxx69| 日本欧美国产在线| 综合激情国产一区| 亚洲成av人影院在线观看| 欧美日韩国产999| 国产日韩欧美视频| 久久久女人电视剧免费播放下载| 日韩免费观看网站| 中文字幕日韩在线视频| 日韩精品一区二区三区第95| 日韩少妇与小伙激情| 亚洲午夜精品久久久久久久久久久久| 日韩欧美精品中文字幕| 欧美体内谢she精2性欧美| 成人黄色片在线| 456国产精品| 国产第一区电影| 亚洲天堂开心观看| 亚洲无限av看| 91精品国产乱码久久久久久久久| 久久久久久久久久久av| 国产精品成人观看视频国产奇米| 日本一区二三区好的精华液| 成人国产精品一区| 精品成人乱色一区二区| 色与欲影视天天看综合网| 日韩成人中文电影| 88国产精品欧美一区二区三区| 久久久精品中文字幕| 一区二区三区 在线观看视| 国产亚洲xxx| 九九九久久国产免费| 欧美理论电影网| 久久久精品一区二区三区| 亚洲第五色综合网| 色噜噜狠狠狠综合曰曰曰| 激情久久av一区av二区av三区| 国产精品一区二区久久久久| 亚洲第一在线视频| 国产丝袜一区二区三区| 国内精久久久久久久久久人| 国产精品一区二区三区在线播放| 国产成人在线播放| 亚洲国产成人91精品| 91精品国产综合久久男男| 88xx成人精品| 久久久久久久久久久久久久久久久久av| 国产91精品最新在线播放| 欧美亚洲视频一区二区| 懂色av一区二区三区| 中文字幕精品一区二区精品| 亚洲精品国产福利| 欧美极品少妇xxxxx| 国产精品成人v| 91在线无精精品一区二区| 久久久亚洲影院| 欧美一级成年大片在线观看| 亚洲精品女av网站| 中文字幕亚洲二区| 一区二区福利视频| 亚洲高清福利视频| 精品国产精品三级精品av网址| 国产精品va在线播放我和闺蜜| 精品美女永久免费视频| 亚洲精品美女久久久久| 北条麻妃一区二区在线观看| 精品五月天久久| 欧美日韩激情视频| 操日韩av在线电影| 日韩欧美中文第一页| 97色伦亚洲国产| 日本在线观看天堂男亚洲| 久久国产精彩视频| 国产精自产拍久久久久久| 久久亚洲成人精品| 亚洲一区二区三区成人在线视频精品| 日韩在线国产精品| 青草成人免费视频| 韩国福利视频一区| 欧美黄色片免费观看| 日韩网站免费观看高清| 另类图片亚洲另类| 在线观看免费高清视频97| 91夜夜未满十八勿入爽爽影院| 久久激情五月丁香伊人| 亚洲第一区第一页| 国产精品观看在线亚洲人成网| 九九视频直播综合网| 久久国产精品视频| 久久91亚洲精品中文字幕| 欧美成年人视频网站欧美| 91精品国产高清久久久久久| 夜夜嗨av色一区二区不卡| 日韩精品在线观看一区二区| 久久久久久久久久久成人| 国产成人免费91av在线| 欧美华人在线视频| 最近2019年中文视频免费在线观看| 国产精品久久久久久久久久久新郎| 国产精品av免费在线观看| 久久久久久久久久久人体| 亚洲精品中文字幕av| 久久久999国产| 18久久久久久| 亚洲国产精品久久| 日韩中文字幕在线视频播放| 国产精品久久久久久久久免费看| 最新日韩中文字幕| 午夜精品99久久免费| 亚洲免费高清视频| 久久久国产一区二区三区| 亚洲国产精品福利| 久久视频国产精品免费视频在线| 欧美色另类天堂2015| 欧美视频不卡中文| 国产在线播放不卡| 成人天堂噜噜噜| 国产精品久久久久99| 91成人天堂久久成人| 92看片淫黄大片欧美看国产片| 欧美日韩激情视频8区| 亚洲日本成人女熟在线观看| 欧美日韩国产精品一区| 中文字幕日韩av电影| 色妞在线综合亚洲欧美| 亚洲男人天堂九九视频| 亚洲国产日韩欧美在线动漫| 亚洲第一av在线| 亚洲视频axxx| 欧美日韩视频免费播放|