【问题标题】:Xampp/Mac - make a JPEG file accessible via HTTPXampp/Mac - 使 JPEG 文件可通过 HTTP 访问
【发布时间】:2012-11-13 17:20:32
【问题描述】:

我设置了一个虚拟目录:

<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

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

我做错了什么?

【问题讨论】:

  • 你能发布整个 vhost 指令吗?也许随着域的变化。

标签: apache xampp


【解决方案1】:

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

如果你执行“ls -lah”,你的输出是什么?

【讨论】:

  • 太棒了 :-) 您还可以更改 User 指令以确定 apache 将以哪个用户身份运行(但是,如果我是您,我只会坚持文件权限)
猜你喜欢
  • 2022-01-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-03-19
  • 2013-11-07
  • 1970-01-01
  • 2016-12-30
  • 2014-04-27
相关资源
最近更新 更多