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