手记

apache 创建多端口监听

httpd.conf

将
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
改为
LoadModule vhost_alias_module modules/mod_vhost_alias.so

将
#Include conf/extra/httpd-vhosts.conf
改为
Include conf/extra/httpd-vhosts.conf

httpd-vhosts.conf

#监听多个端口
Listen 80
Listen 8003
Listen 8004

<VirtualHost *:80>
    #监听80端口,地址是 D:\apache24\htdocs
    DocumentRoot D:\apache24\htdocs
</VirtualHost>

<VirtualHost *:8003>
    DocumentRoot D:\apache24\htdocs/8003
</VirtualHost>

<VirtualHost *:8004>
    DocumentRoot D:\apache24\htdocs/8004
</VirtualHost>
4人推荐
随时随地看视频
慕课网APP

热门评论

能跟我说一下有什么用吗?谢谢(ps:新手)

查看全部评论