#配置多个端口 允许访问多个项目
打开vhosts.conf文件修改配置
<VirtualHost *:801>
DocumentRoot "D:\phpStudy\WWW\myproject"
ServerName www.myproject.com
ServerAlias 192.168.65.106(这里换成你本地的IP)
<Directory "D:\phpStudy\WWW\myproject">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
打开 httpd-conf 配置文件 配置端口监听,增加801端口
#Listen 12.34.56.78:80
Listen 80
Listen 801(换成你配置的端口)
#配置好后重启Apache,浏览器中访问
192.168.65.106 (访问www.zentao.com)
192.168.65.106:801 (访问www.myproject.com)
原文地址:https://www.cnblogs.com/zzc666/p/11969502.html
时间: 2024-11-07 17:14:48