windows下使用xampp一键安装apache+php运行环境

8/31/2015来源:PHP技巧人气:2243

windows下使用xampp一键安装apache+php运行环境

感谢浏览,欢迎交流=。=


想为我老爸开发一套库存管理系统,借此机会打算使用下ext+php+apache+linux环境尝尝鲜。

为了在windows搭建本地开发测试环境,官网下载xampp,一键安装apache,MySQL等环境

启动xampp发现80端口被IIS占用,443端口被VMware占用

于是,度娘告知:443:配置文件位于C:\xampp\apache\conf\extra\httpd-ssl.conf中则修改文件中443端口为44480:配置文件位于C:\xampp\apache\conf\httpd.conf中则修改文件中80端口为60000访问localhost:60000/xampp,问题解决

然而,依然无法通过xampp快速启动浏览器访问60000端口,定位到80,进入iis页面。于是寻找xampp是否有服务需要重启,寻找发现没有。遂寻找xampp的配置文件,果然xampp-control.ini文件中发现如下配置:[ServicePorts]Apache=80ApacheSSL=443MySQL=3306修改为60000,444后重启xampp,问题解决

为apache增加多端口多站点:修改文件C:\xampp\apache\conf\extra\httpd-vhosts.conf<VirtualHost *:60001> ServerAdmin [email protected] DocumentRoot "E:\ApacheRoot\rivertest" ServerName localhost ServerAlias localhost ErrorLog "logs/dummy-host2.localhost-error.log" CustomLog "logs/dummy-host2.localhost-access.log" common <Directory "E:\ApacheRoot\rivertest"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost> <VirtualHost *:60000> ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs" ServerName localhost ServerAlias localhost ErrorLog "logs/dummy-host.localhost-error.log" CustomLog "logs/dummy-host.localhost-access.log" common <Directory "C:/xampp/htdocs"> Options Indexes FollowSymLinks AllowOverride All Allow from all </Directory> </VirtualHost>