如何在WampServer 2.5上更改www根目录 [英] How to Change the www root directory on WampServer 2.5

查看:66
本文介绍了如何在WampServer 2.5上更改www根目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将wamp的默认站点目录从"c:\ wamp \ www"更改为"d:\ sites". 现在,我在"d:\ sites"中的项目未显示在项目列表中:

My need is to change the default sites directory of wamp from say "c:\wamp\www" to say "d:\sites". Right now my projects in "d:\sites" do not show in the project list:

我找到了一些过去的答案,例如一个我认为不适用于WampServer 2.5(无论如何,它不适用于我).

I found a few past answers like this one and this one which I think are not applicable to WampServer 2.5 (anyway, it did not work for me).

我还在文档中找到了过程,但似乎还很远太复杂,无法满足我的需求.

I also found this procedure in the documentation, but it seems far too complex for what I need.

在此问题上的任何帮助将不胜感激.

Any help on this matter would be appreciated.

推荐答案

在较新版本的wamp中,更改httpd.conf中的DocumentRoot不会更改DOCUMENT_ROOT.即使重新启动后,它也保持为"c:/wamp64/www/".

In newer version of wamp, changing DocumentRoot in httpd.conf did not change DOCUMENT_ROOT. Even after restarting, it stayed as "c:/wamp64/www/".

相反,在此文件中设置了DocumentRoot:

Instead, the DocumentRoot is set in this file:

  c:\wamp64\bin\apache\apache2.4.18\conf\extra\httpd-vhosts.conf

要更改localhost目录,请将其更改为您的路径:

To change the localhost directory, change these to your path:

      DocumentRoot c:/www
      <Directory  "c:/www/">

这篇关于如何在WampServer 2.5上更改www根目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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