如何更改WampServer 3上的www根目录

问题描述 投票:7回答:2

如何将当前安装的wampserver的根目录更改为其他目录。我从httpd.conf更改了目录位置。我在Dcoument root和Directory之前使用Hash标签但是对于新root我有新行没有hash标签。

#DocumentRoot "c:/wamp64/www"
DocumentRoot "G:/04-WebSites/NEW_WORK"
#<Directory "c:/wamp64/www/">
<Directory "G:/04-WebSites/NEW_WORK/">

C:\ wamp64 \ BIN \ apache的\ apache2.4.18 \的conf \ httpd.conf文件

经过多次重启服务器,pc,wamp服务器仍然显示www / index页面。

enter image description here

php apache wamp
2个回答
17
投票

您还需要在位于\ conf \ extra中的httpd-vhosts.conf中更改这些值


1
投票
  1. 打开wampserver 3。
  2. 选择Apache菜单 - > httpd-vhosts.conf。
  3. 将DocumentRoot路径 - >“$ {INSTALL_DIR} / www”更改为您的文件夹位置,例如“E:/ WWW”
  4. 重启Wampserver
  5. 完成。

详情请访问:https://phantomthemes.com/how-to-change-the-www-root-directory-on-wampserver-3/

如果它不起作用,请告诉我

© www.soinside.com 2019 - 2024. All rights reserved.