<VirtualHost 192.168.0.20:>
ServerAdmin www.test2.com
DocumentRoot "D:/PHP/Apache/htdocs/testSite2"
<Directory "D:/PHP/Apache/htdocs/testSite2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
这样我们就可以用192.168.0.:81访问testsite2了。 如果想在internet访问IP地址必须是静态的

详细设置代码

<VirtualHost *:80>
    ServerName  global_csi.local
    DocumentRoot "E:/wamp/www/global_csi/www"
    ErrorLog "E:/wamp/logs/global_csi-error.log"
    CustomLog "E:/wamp/logs/global_csi-access.log" common
  <Directory "E:/wamp/www/global_csi_20/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

</VirtualHost>

上述情况还可能报错,you have no permi to acess !

还需要在allow from all前面加入

##############VirtualHost*#主机监听端口默认是是83#############

Alias /www  "D:/www"
<Directory "D:/www">
 Options Indexes MultiViews
 AllowOverride All 
 Order allow,deny
 Allow from all
 Require all granted
 DirectoryIndex default.php
</Directory>

最新文章

  1. iOS10 适配问题-Xcode8
  2. 在使用 HttpWebRequest Post数据时候返回 400错误
  3. 阿里云mariadb无法启动问题
  4. 【分布式协调器】Paxos的工程实现-Cocklebur状态转移
  5. SNF开发平台WinForm之十-Excel导入-SNF快速开发平台3.3-Spring.Net.Framework
  6. Java学习-021-Properties 获取配置项对应的值
  7. 2016032901 - ubuntu安装jdk
  8. CI源码学习 一步一步重写 CodeIgniter 框架
  9. Chosen 基本使用
  10. Windows API 之 FineFirstFile、FindNextFile
  11. R学习笔记 第三篇:数据框
  12. ArcGIS案例学习笔记2_1_学校选址适宜性分析
  13. Android.InstallAntOnMacOSX
  14. [华商韬略] 拉里&#183;埃里森(Larry Elison) 的传奇人生
  15. 【Javascript】 DOM节点
  16. 验证组件——FluentValidation
  17. python学习(十四) 网络编程
  18. CSS基础(续)
  19. aoj 0118 Property Distribution
  20. Android用RecyclerView实现的二维Excel效果组件

热门文章

  1. A - Color the ball HDU - 1556 (差分数组+前缀和)
  2. 利用salt-stack 对多台分布式应用进行简单部署jar包项目:
  3. java设计模式--六大原则
  4. Delphi 通过脚本 在 设计期 改 控件name 属性
  5. MVC的异步模式
  6. [Typora ] LaTeX公式输入
  7. c#学习笔记01——引用&amp;类
  8. 蓝桥杯剪格子dfs
  9. Maven--导出pom中依赖的jar包
  10. 格式化输入 \_\_format\_\_