2012-11-13 24 views
0

我有一个虚拟目录设置:XAMPP/Mac的 - 做一个JPEG文件访问通过HTTP

<Directory "/Applications/XAMPP/branding"> 
    Options None 
    AllowOverride All 
    Order allow,deny 
    Allow from all 
</Directory> 

与定义的别名:

Alias /branding "/Applications/XAMPP/branding" 

我把一个JPEG文件,该文件夹中和尝试通过访问它:

http://127.0.0.1/branding/image.jpeg 

我正在一个身份验证错误:

Access forbidden! 

You don't have permission to access the requested object. It is either read-protected or not readable by the server. 

If you think this is a server error, please contact the webmaster. 

Error 403 

127.0.0.1 
Tue Nov 13 12:15:14 2012 
Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 

我在进行更改后重新启动了Web服务器。

我做错了什么?

+0

你可以发布整个vhost指令吗?也许随着域名的变化。 – Homer6

回答

0

该文件是否具有对Apache运行的用户可见的权限?

如果你做一个“ls -lah”,你的输出是什么?

+0

-rw ------- @ 1 user admin 52K Oct 1 10:15 oldman.jpeg – JasonGenX

+0

你可以用chmod 644 oldman.jpeg – Homer6

+0

这样做了。谢谢。 – JasonGenX