博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
apache 配置不同的端口访问不同的站点
阅读量:4290 次
发布时间:2019-05-27

本文共 1141 字,大约阅读时间需要 3 分钟。

找到“D:\apache\conf”的“httpd.conf”

# Virtual hosts# Include conf/extra/httpd-vhosts.conf

去掉#号,修改为:

# Virtual hostsInclude conf/extra/httpd-vhosts.conf

效果图:

apache 配置不同的端口访问不同的站点

找到“D:\apache\conf\extra”的“httpd-vhosts.conf”

80重新修改 DocumentRoot 的地址,81是要添加的部分。修改为:

ServerAdmin webmaster@dummy-host.onestopweb.cn DocumentRoot "D:/www" ServerName dummy-host.onestopweb.cn ServerAlias www.dummy-host.onestopweb.cn ErrorLog "logs/dummy-host.onestopweb.cn-error.log" CustomLog "logs/dummy-host.onestopweb.cn-access.log" common
ServerAdmin webmaster@dummy-host2.onestopweb.cn DocumentRoot "D:/www" ServerName dummy-host2.onestopweb.cn ErrorLog "logs/dummy-host2.onestopweb.cn-error.log" CustomLog "logs/dummy-host2.onestopweb.cn-access.log" common
Listen 81
ServerAdmin webmaster@dummy-host.localhost DocumentRoot "D:/www2" ServerName localhost:81 ErrorLog "logs/dummy-host.localhost-error.log" CustomLog "logs/dummy-host.localhost-access.log" common
Options Indexes FollowSymLinksAllowOverride AllOrder allow,denyAllow from all

效果图:

apache 配置不同的端口访问不同的站点

通过81端口打开本地站点:

apache 配置不同的端口访问不同的站点

转载地址:http://jxggi.baihongyu.com/

你可能感兴趣的文章
免费的在线 SQL 数据库环境
查看>>
边际效用
查看>>
python做量化交易干货分享
查看>>
TuShare使用(一)简单获取个股数据
查看>>
关于QPS、TPS、PV、UV、GMV、IP、RPS
查看>>
Laravel应用代码分层
查看>>
命令行的艺术
查看>>
MySQL高性能优化实战总结!
查看>>
你对swoole的进程,线程知道多少
查看>>
ElasticSearch安装 (Mac)
查看>>
Elasticsearch index [XXX] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]问题解决
查看>>
架构技术及架构要素
查看>>
安装tp6后开启多应用模式
查看>>
分布式事务的2PC、3PC、TCC
查看>>
什么是架构?
查看>>
架构设计(一) 架构演变
查看>>
书单《人性的弱点》
查看>>
配置nginx反向代理解析不同域名转发到不同端口
查看>>
Docker安装gitbook
查看>>
Zookeeper入门看这篇就够了
查看>>