更改WAMP中的根目录

cha*_*ser 6 wampserver

我想更改根目录以将目录指向以下位置:

C:\ Documents and Settings\User\My Documents [documents]\wamp

我知道我必须在以下行中更改apache http.conf文件

DocumentRoot"c:/ Documents and Settings/User/My Documents/[documents] /"

但是,似乎[文档]旁边的方括号导致显示禁止错误:

被禁止

您无权访问此服务器上的/ login /.

有没有办法在目录树中使用方括号?[文件]以特定目的命名,它需要保持这种状态.否则,我需要做很多重新编码.

指向目录树时有什么规则?

提前致谢.

muj*_*ars 12

我得到了相同的禁止错误(在Windows机器中用于wamp),经过大量的研发后我发现需要更改httpd-vhosts.conf文件中的默认虚拟主机,该主机存在于:

C:\wamp\bin\apache\Apache2.2.17\conf\extra  
Run Code Online (Sandbox Code Playgroud)

(将目录更改c:/wamp/www为您想要的)

来自:

ServerAdmin webmaster@localhost  
DocumentRoot “c:/wamp/www”  
ServerName localhost  
ErrorLog “logs/localhost-error.log”  
CustomLog “logs/localhost-access.log” common  
Run Code Online (Sandbox Code Playgroud)

至:

ServerAdmin webmaster@localhost
DocumentRoot “E:/wamp/www”
ServerName localhost
ErrorLog “logs/localhost-error.log”
CustomLog “logs/localhost-access.log” common
Run Code Online (Sandbox Code Playgroud)