PHPStudy Apache配置HTTPS

开启php_openssl
  • 直接在phpStudy中php扩展插件中找到php_openssl打勾即可开启
在服务器配置文件httpd.conf中添加
Include conf/extra/httpd-vhostssl.conf

再相应目录创建httpd-vhostssl.conf文件,内容如

Listen 443

    DocumentRoot "D:\php\PHPTutorial\WWW\18_3_6-uskd"
    ServerName www.uskdfin.com
ServerAlias 

DocumentRoot "D:\php\PHPTutorial\WWW\18_3_6-uskd" 
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL

SSLCertificateFile "D:\php\PHPTutorial\Apache\cert\uskdfin.crt" 
SSLCertificateKeyFile "D:\php\PHPTutorial\Apache\cert\uskdfin.key"
SSLCertificateChainFile "D:\php\PHPTutorial\Apache\cert\uskdfin.crt" 

  
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  


   ServerName www.uskdfin.com
   RewriteEngine On
   RewriteRule ^/(.*)$ https://www.uskdfin.com/$1 [R=301,L]

你可能感兴趣的:(PHPStudy Apache配置HTTPS)