国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Windows > 正文

Windows Server 2016 上配置 APACHE+SSL+PHP+perl的教程詳解

2019-11-02 16:54:28
字體:
來源:轉載
供稿:網友
<strong><span style="color:#FF0000;">安裝環境</span></strong>  谷歌云實例 Windows Server 2016 Apache   Apache/2.4.25 (win64-VC14) PHP    php-5.6.30 (VC11 x64 Thread Safe) PERL    ActivePerl-5.24 (Win64) OpenSSL  openssl-1.0.2j-win64 VC14    Microsoft Visual C++ 2015(vcredist_x64) VC11    Microsoft Visual C++ 2015(vcredist_x64) <strong><span style="color:#FF0000;">1.安裝 Apache</span></strong> Apache/2.2 不支持php-5.3以后的版本,用最新的 Apache/2.4,由于是Win64-VC14版本,需安裝 x64位版本的 VC2015運行庫,即VC14 http://httpd.apache.org/download.cgi http://www.apachelounge.com/download/VC14/binaries/httpd-2.4.25-win64-VC14.zip 解壓到 D:/httpd 修改 D:/httpd/conf 和 D:/httpd/conf/extra 目錄下的文件,替換 C:/apache24 到 D:/httpd 

<span style="color:#FF0000;"><strong>2.安裝 SSL</strong></span> http://openssl.org https://wiki.openssl.org/index.php/Binaries https://slproweb.com/products/Win32OpenSSL.html 這里使用了 Apache/2.4.25 自帶的 openssl ,在 D:/httpd/bin 目錄 ,默認配置文件位于 C:/openssl-1.0.2j-win64/ssl/openssl.cnf 用命令建立 server.key 和 server.crt   set path=D:/httpd/bin   D:   cd D:/httpd/conf/   copy openssl.cnf openssl.conf   mkdir demoCA/newcerts   echo.>demoCA/index.txt   echo.>demoCA/serial   openssl genrsa -out server.key 1024   openssl req -new -x509 -key server.key -out server.crt -days 3650 -config openssl.conf   修改 D:/httpd/conf/httpd.conf 文件,去掉下面兩行前面的 # #LoadModule ssl_module modules/mod_ssl.so #Include conf/extra/httpd-ssl.conf 修改 D:/httpd/conf/extra/httpd-ssl.conf 文件,注釋下面的行 #SSLSessionCache    "shmcb:d:/httpd/logs/ssl_scache(512000)" <span style="color:#FF0000;"><strong>3.安裝 perl</strong></span> 
下載后安裝時選第三項會自動安裝到 c:/perl64 ,無需做其它修改,以后加載.pl文件時,第一行指向 #!c:/perl64/bin/perl.exe http://perl.org http://www.activestate.com/activeperl/downloads 修改 D:/httpd/conf/httpd.conf 文件,去掉下行前面的 # #LoadModule cgi_module modules/mod_cgi.so <span style="color:#FF0000;"><strong>4.安裝 php</strong></span> 

php 有兩種版本,Thread Safe(TS) 和 Non Thread Safe(NTS) , TS 用于APACHE ,NTS 用于IIS 

由于 VC11 x64 Thread Safe 需安裝 x64位版本的 VC2012運行庫,即VC11,在微軟官方網站搜索安裝。   

http://windows.php.net/download/ http://windows.php.net/downloads/releases/php-5.6.30-Win32-VC11-x64.zip 解壓到 D:/httpd/php-5.6.30 ,把 php.ini-production 改名為 php.ini 修改 D:/httpd/conf/httpd.conf 文件,增加下面的行 LoadModule php5_module "D:/httpd/php-5.6.30/php5apache2_4.dll" PHPIniDir "d:/httpd/php-5.6.30" AddType application/x-httpd-php .php .html .htm 如果出現找不到 D:/httpd/php-5.6.30/php5apache2_4.dll 文件的提示,可能是需要的VC運行庫沒有安裝,或者是apache和php的版本不配。 
5.到此配置結束,<span style="color:#FF0000;"><strong>使用下面的命令啟動服務</strong></span>  httpd -k install httpd -k start  單是 httpd -k start 不能啟動服務 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 那坡县| 石狮市| 青川县| 新河县| 正镶白旗| 合山市| 保定市| 克东县| 临湘市| 岳阳县| 吴江市| 湛江市| 兴宁市| 曲松县| 陕西省| 改则县| 安丘市| 九台市| 旬邑县| 永州市| 无棣县| 大名县| 浦江县| 闵行区| 罗定市| 南川市| 珲春市| 武鸣县| 文登市| 靖边县| 巴东县| 龙州县| 高唐县| 吉安市| 营口市| 大英县| 察哈| 上杭县| 喜德县| 印江| 鄂托克前旗|