阿帕奇的Windows虚拟目录配置帮助 [英] apache on windows virtual directory config help

查看:286
本文介绍了阿帕奇的Windows虚拟目录配置帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows XP上通过Xampplite文件运行Apache,并可以使用配置帮助我的虚拟目录。这里就是我希望能在我的dev的盒子做的:

I'm running Apache on Windows XP via Xampplite, and could use help configuring my virtual directory. Here's what I'm hoping to do on my dev box:


  1. 我希望我的源文件住XAMPP的htdocs目录以外

  2. 我的本地机器上,我可以在访问该项目的http:// myproject的

  3. 别人我的本地网络上可以my.ip.address / myproject的访问项目

  4. 保持本地主机指向XAMPP的htdocs文件夹,所以我可以轻松地添加其他项目。

我有1安培; 2编辑hosts文件窗口工作,并在XAMPP的apache的\\的conf \\额外\\的httpd-vhosts.conf文件中添加一个虚拟目录。我没有立即看到如何做到3不搞乱4。

I've got 1 & 2 working by editing the windows hosts file, and adding a virtual directory in xampp's apache\conf\extra\httpd-vhosts.conf file. I don't immediately see how to do 3 without messing up 4.

推荐答案

想通了:使用别名作为#3,而不是虚拟主机,这样的:

Figured it out: use Alias for #3, instead of VirtualHost, thus:

Alias /myproject "C:/path/to/my/project"
<Directory "C:/path/to/my/project">
  Options Indexes FollowSymLinks MultiViews ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>

这篇关于阿帕奇的Windows虚拟目录配置帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆