apache 服务器上多端口访问项目

httpd.conf中#Listen 12.34.56.78:80注释

httpd-vhosts.conf中

Listen 80

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "X:\xampp\htdocs"
ServerName localhost
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
</VirtualHost>

Listen 81
<VirtualHost *:81>
DocumentRoot "X:\xampp\htdocs\tp\public"
ServerName ip地址
ErrorLog "logs/xx.log"
CustomLog "logs/xx.log" common
</VirtualHost>

点赞

发表回复

电子邮件地址不会被公开。必填项已用 * 标注