当前位置: 首页 > 工具软件 > PHP Sandbox > 使用案例 >

PHP工具箱配置SSL

卜弘文
2023-12-01
  1. PHP扩展及设置->PHP扩展->php_openssl
  2. edit \myphp_www\PHPTutorial\Apache\conf\httpd.conf.
    uncomment 2 lines:
    LoadModule ssl_module modules/mod_ssl.so
    Include conf/extra/httpd-ssl.conf
  3. edit \myphp_www\PHPTutorial\Apache\conf\extra\httpd-ssl.conf
    <VirtualHost :443>
    DocumentRoot “D:\myphp_www\PHPTutorial\WWW\test\public”
    ServerName www.test.cn
    ErrorLog “D:/myphp_www/PHPTutorial/Apache/logs/error.log”
    TransferLog “D:/myphp_www/PHPTutorial/Apache/logs/access.log”
    SSLEngine on
    SSLProtocol all -SSLv2 -SSLv3
    SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!3DES:!MD5:!ADH:!RC4:!DH:!DHE
    SSLCertificateFile “D:/myphp_www/PHPTutorial/Apache/conf/sssl/www.test.cn.crt”
    SSLCertificateKeyFile “D:/myphp_www/PHPTutorial/Apache/conf/sssl/www.test.cn.key”
    SSLCertificateChainFile “D:/myphp_www/PHPTutorial/Apache/conf/sssl/issuer.crt”
    <FilesMatch “.(cgi|shtml|phtml|php)$”>
    SSLOptions +StdEnvVars

    <Directory “D:\myphp_www\PHPTutorial\WWW\test\public”>
    Options +Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    #Require all granted
    Allow from all

    BrowserMatch “.MSIE.
    nokeepalive ssl-unclean-shutdown
    downgrade-1.0 force-response-1.0
    CustomLog “D:/myphp_www/PHPTutorial/Apache/logs/ssl_request.log”
    “%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x “%r” %b”
  4. create a site in PHPTool: name: www.test.cn(must be same as ServerName in httpd-ssl.conf), port: port number can be set to 80.
  5. set Echosite tunnels(https server name and port number must be same as the site created in PHPTool)
    tunnels:
    name1:
    subdomain: “test”
    proto:
    http: www.test.cn:80
    name2:
    subdomain: “test”
    proto:
    https: www.test.cn:80
    6. restart PHPTool
    7. https://www.test.cn
 类似资料: