在Windows 7上的Apache别名

那么,大家好。 我试图使别名工作在Apache和Windows 7上。所以,这就是我所拥有的:

<IfModule alias_module> Alias /TamasMobile/ "C:/Users/IssamTP/Documents/NetBeansProjects/TamasMobile/" </IfModule> <Directory "C:/Users/IssamTP/Documents/NetBeansProjects/TamasMobile/"> Options Indexes FollowSymLinks DirectoryIndex index.html index.php AllowOverride None Order deny,allow Deny from all </Directory> 

加载网站,导致这个错误:

 403 Forbidden You don't have permission to access /TamasMobile/ on this server. 

虽然Apache错误日志说:

 [Tue Sep 07 00:49:29 2010] [error] [client 127.0.0.1] client denied by server configuration: C:/Users/IssamTP/Documents/NetBeansProjects/TamasMobile/ 

是的,我可以改变工作目录:./htdocs/TamasMobile/或做类似的事情,但我想知道如何解决这个只是为了个人兴趣。

非常感谢你们。

当然这条线:

 Deny from all 

正在造成你的问题。 放下这条线,看看它是否工作。 你想从所有的Deny做什么? 通常情况下,根目录具有严格的Deny,所有的Alias都有更宽松的访问权限。 举个例子:

 <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "C:/Users/IssamTP/Documents/NetBeansProjects/TamasMobile/"> Order allow,deny Allow from all </Directory>