建立Apache HTTPS SSL服務
2013/11/06 17:32
瀏覽480
迴響0
推薦1
引用0
以下是否Google上找到的步驟:
ssl - How do I create HTTPS for localhost apache? - Stack Overflow
Steps:
- ...
- Open a command prompt in
Apache2\conffolder - ....
..\bin\openssl req -config openssl.cnf -new -out blarg.csr -keyout blarg.pem -
You can leave all questions blank except:
- PEM Passphrase: a temporary password such as "password"
- Common Name: the hostname of your server
-
....
..\bin\openssl rsa -in blarg.pem -out blarg.key - ....
..\bin\openssl x509 -in blarg.csr -out blarg.cert -req -signkey blarg.key -days 365 -
Open Apache's
conf\httpd.conffile and ensure SSL module is enabled - there should be no hash at the start of this line:LoadModule ssl_module modules/mod_ssl.so -
... uncomment this line:
Include conf/extra/httpd-ssl.conf -
In the SSL config
httpd-ssl.conf... update the following lines:- Update
SSLSessionCache "shmcb:C:\Program Files (x86)\Zend\Apache2/logs/ssl_scache(512000)"
toSSLSessionCache "shmcb:C:/Progra\~2/Zend/Apache2/logs/ssl_scache(512000)"
(The brackets in the path confuse the module, so we need to escape them) DocumentRoot- set this to the folder for your web filesServerName- the server's hostnameSSLCertificateFile "conf/blarg.cert"SSLCertificateKeyFile "conf/blarg.key"
- Update
-
Restart Apache.
- Try loading
https://localhost/in your browser.
-----------------------------
加入php:
# For PHP 5 do something like this:
LoadModule php5_module "c:/php-5.4.21/php5apache2_2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php-5.4.21"
你可能會有興趣的文章:
限會員,要發表迴響,請先登入











