发布于 2016-02-06 09:56:09 | 159 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Apache Web服务器

Apache是世界使用排名第一的Web服务器软件。它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的Web服务器端软件。


这篇文章主要介绍了Apache如何配置多端口 多虚拟主机 局域网访问,需要的朋友可以参考下
一、在\wamp\bin\apache\Apache2.4.4\conf\extra\httpd-vhosts.conf 修改如下
 
NameVirtualHost *:80 

<VirtualHost *:80> 
DocumentRoot "E:/website/pxsj" 
ServerName host7.com 
ServerAlias 192.168.1.116 
<Directory "E:/website/pxsj"> 
Options Indexes FollowSymLinks 
AllowOverride None 
Order allow,deny 
Allow from all 
</Directory> 
</VirtualHost> 

NameVirtualHost *:8080 

<VirtualHost *:8080> 
DocumentRoot "E:/website/whsj" 
ServerName host10.com:8080 
ServerAlias 192.168.1.116:8080 
<Directory "E:/website/whsj"> 
Options Indexes FollowSymLinks 
AllowOverride None 
Order allow,deny 
Allow from all 
</Directory> 
</VirtualHost> 

二、\wamp\bin\apache\Apache2.4.4\conf\httpd.conf 修改如下:

在该文件中查找“Listen”一词修改
 
Listen 80 
Listen 8080 

# Virtual hosts
# Include conf/extra/httpd-vhosts.conf去掉前面的#,这样就开启了httpd-vhosts虚拟主机文件。这时候重启环境

三、C:\Windows\System32\drivers\etc\hosts 修改配置
 
<pre code_snippet_id="331423" snippet_file_name="blog_20140507_1_9705788"></pre> 
<pre></pre> 
<pre></pre> 
<pre></pre> 


最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务