刚刚安装完WampServer 3.0.4。 我想设置它,所以当我访问 http:// localhost / 时,它会提供 方法 strong> p>
我发现很多答案都说 我必须打开 请注意,更新的唯一两件事是文档根目录和目录路径。 p>
我的问题 strong> p>
现在,当我指出 我的浏览器 ...这让我相信我对httpd.conf的更改没有任何区别。 p>
有没有人跑过 进入这个问题? 有没有不同的方法来更改 e:/中的文件 Archives / code>,而不是默认的WampServer页面。 p>
c:/wamp/bin/apache/apache2.4.18/conf/httpd.conf code>并查找DocumentRoot和Directory行(我在第250行找到它们)。 我替换了这个: p>
DocumentRoot“c:/ wamp / www”
< Directory“c:/ wamp / www /”>
#...
选项+索引+ FollowSymLinks
#...
NandOverride all
#onlineoffline标记 - 不要删除
需要本地
< /目录>
code> pre>
< p> with this: p>
DocumentRoot“e:/ Archives /”
&lt; Directory“e:/ Archives /”&gt;
#...
选项+ 索引+ FollowSymLinks
#...
NandOverride all
#onlineoffline标记 - 请勿删除
需要本地
&lt; /目录&gt;
code> pre>
http:// localhost code>,仍然 em>在
C:\ wamp \ www \ index.php code>中显示相同的默认WampServer页面。 单击
phpinfo() code>链接显示以下内容: p>
DOCUMENT_ROOT C:/ wamp / www
CONTEXT_DOCUMENT_ROOT C:/ wamp / www
< / code> pre>
localhost code>指向的默认位置? 我尝试重新启动WampServer,重新启动计算机(运行Windows 7)等。 p>
div>
Just finished installing WampServer 3.0.4. I want to set it up so when I visit http://localhost/, it serves the files within e:/Archives/
, instead of the default WampServer page.
Approach
I found many answers that say I have to open c:/wamp/bin/apache/apache2.4.18/conf/httpd.conf
and look for both the DocumentRoot and Directory lines (I found them around line 250). I substituted this:
DocumentRoot "c:/wamp/www"
<Directory "c:/wamp/www/">
#...
Options +Indexes +FollowSymLinks
#...
AllowOverride all
# onlineoffline tag - don't remove
Require local
</Directory>
with this:
DocumentRoot "e:/Archives/"
<Directory "e:/Archives/">
#...
Options +Indexes +FollowSymLinks
#...
AllowOverride all
# onlineoffline tag - don't remove
Require local
</Directory>
Notice the only two things updated were the Document Root and Directory paths.
My problem
Now, when I point my browser to http://localhost
, it still shows the same default WampServer page in C:\wamp\www\index.php
. Clicking on the phpinfo()
link shows the following:
DOCUMENT_ROOT C:/wamp/www
CONTEXT_DOCUMENT_ROOT C:/wamp/www
... which leads me to believe that my changes to httpd.conf aren't making any difference.
Has anybody ran into this issue? Is there a different way to change the default location that localhost
points to? I've tried restarting WampServer, restarting my computer (Running Windows 7), etc.