XAMPP – 更改DocumentRoot文件夹不起作用

我有一个奇怪的问题,我还没有遇到。 当我更改DocumentRoot并重新启动服务器时,不会应用更改。 它以前工作,但突然不是。

DocumentRoot "F:/xampp/htdocs/www/pct/" 

我也一定要编辑正确的文件:

  F:\xampp\apache\conf\httpd.conf 

您确定您正在编辑您正在使用的虚拟主机的DocumentRoot? 确保DocumentRoot指令位于您当前使用的虚拟主机下。

它应该是这样的:

 <virtualhost *:80> DocumentRoot ***** .....other stuffs.... </virtualhost>