配置xampp php openssl遇到的问题

来源:互联网 发布:navicat for mysql语法 编辑:程序博客网 时间:2024/04/28 05:54

记录下两天来遇到的一些坑:


第一个坑:端口被占用


查询端口使用命令:

netstat -aon|findstr "80"  ⇒得到使用进程ID

tasklist|findstr "进程ID"   ⇒得到使用进程名称

查询后发现被坑爹的VMWare服务占用,没法,只好修改配置文件。


httpd.conf

Listen 8080

ServerName localhost:8080


httpd-ssl.conf

Listen 8443

<VirtualHost _default_:8443>

ServerName localhost:8443


修改后localhost:8080可以正常访问了,但https://localhost:8443下的index.php还是无法访问。


第二步:

修改php.ini,开启openssl, 还是提示无法访问。

extension=php_openssl.dll

郁闷了好久后,找到了某个博客提示配置vHost,总算解决问题。

httpd-vhosts.conf

<VirtualHost *:8443>
        DocumentRoot "C:/Users/myTest/workspace"
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
</VirtualHost>


配置环境还真不容易。

0 0
原创粉丝点击