apache 配置多端口站点方法
1、修改apache配置文件httpd.conf(此文件在apache安装目录下的conf文件内),找到Listen 行,添加需要配置的端口8080 和8888。
Listen 8080
Listen 8888
2、修改配置文件httpd-vhosts.conf,添加端口对应的网站文件目录。
<VirtualHost *:8080>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "E:/PHP/Apache24/htdocs/8080"
<Directory />
Options FollowSymLinks
#AllowOverride None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ServerName 127.0.0.1:8080
#ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
同理将8080换成8888,并将文件目录修改到对应的网站目录即可
3、最终实现结果
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:108
阅读量:107
阅读量:51
阅读量:169
阅读量:57