xampp的配置端口与增加项目

xampp装好后,一般会有端口(最多的是80端口占用)与项目(新增一个)的问题。

修改端口

xampps\apache\conf下的 httpd.conf(第十行):

Listen 80 改为 Listen 8080

注意: ServerName localhost:80 这个是指 phpadmin的访问地址,不需要更改。

新增项目

示例代码:

<VirtualHost *:8081> ServerName localhost:8081 DocumentRoot "D:/workspace/shiyin/shiyin-server-web-php" <Directory "D:/workspace/shiyin/shiyin-server-web-php"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted </Directory> </VirtualHost>

同时需要在 Listen 8080 后增加 Listen 8081

Written on January 3, 2016