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

How to Change the www root directory on WampServer 3

如何将当前安装的 wampserver 的根目录更改为其他目录。 我已从 httpd.conf 更改目录位置 像。 我在 Dcoument 根和目录之前使用哈希标记,但对于新根,我有没有哈希标记的新行。

#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页面。

您还需要在位于 \conf\extra

的 httpd-vhosts.conf 中更改这些值
  1. 打开 wampserver 3。
  2. Select 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/

如果它不起作用请告诉我