关于 php:如何更改 WampServer 3 上的 www 根目录 | 珊瑚贝

How to Change the www root directory on WampServer 3


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

1
2
3
4
#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页面。

index

  • 不要更改这些值。而是为您的每个项目创建一个虚拟主机


您还需要在位于 \\\\\\\\conf\\\\\\\\extra

的 httpd-vhosts.conf 中更改这些值

  • 请注意,如果您的路径包含空格,例如:g:/Google Drive/,则需要在两行中使用双引号 “”。
  • 谢谢你。这是我见过的唯一地方。其他所有方法都只说要更改 httpd.conf 中的文件夹位置,这对我不起作用。


  • 打开 wampserver 3 。
  • 选择 Apache 菜单 -> httpd-vhosts.conf。
  • 将 DocumentRoot 路径 –> “${INSTALL_DIR}/www” 更改为您的文件夹位置,例如”E:/www”
  • 重新启动 Wampserver
  • 完毕。
  • 有关详细博客,请访问此处:https://phantomthemes.com/how-to-change-the-www-root-directory-on-wampserver-3/

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

    • 欢迎来到堆栈溢出!请注意,如果您想推广或推荐自己的产品/博客,有一些指导方针可以这样做。关注它们将帮助您避免给人留下垃圾邮件的印象。您能否编辑以明确说明您的隶属关系?谢谢。 (如果您实际上没有附属关系,则可能也值得一提。)


    来源:https://www.codenong.com/38706375/

    微信公众号
    手机浏览(小程序)

    Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

    Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

    Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9138.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
    0
    分享到:
    没有账号? 忘记密码?