Apache(httpd) - 您无权访问

时间:2015-08-27 22:14:48

标签: apache

我正在尝试从我的linux服务器运行以下命令

curl -T helloworld.txt -u user:pwd http://<ip>/record/helloworld.txt

无法将helloworld.txt文件上传到我的http url

错误:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /record/helloworld.txt
on this server.</p>
<hr>
<address>Apache/2.2.3 (Red Hat) Server at <ip> Port 80</address>
</body>
</html>

的httpd.conf:

Alias /record /usr/bin/Test/web/record
<Directory /usr/bin/Test/web/record>
    DAV On
    Options Indexes MultiViews FollowSymLinks
    EnableSendfile off
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>
<Location "/record">
    DAV On
    AuthType Basic
    AuthName "user"
    AuthUserFile /usr/bin/Test/web/.htpasswd
    Require valid-user
    RewriteEngine off
</Location>

httpd错误日志:

[Thu Aug 27 16:54:39 2015] [notice] caught SIGTERM, shutting down
[Thu Aug 27 16:54:39 2015] [notice] SELinux policy enabled; httpd running as     context root:system_r:httpd_t:s0
[Thu Aug 27 16:54:39 2015] [notice] suEXEC mechanism enabled (wrapper:    /usr/sbin/suexec)
[Thu Aug 27 16:54:39 2015] [notice] Digest: generating secret for digest authentication ...
[Thu Aug 27 16:54:39 2015] [notice] Digest: done
[Thu Aug 27 16:54:39 2015] [notice] Apache/2.2.3 (Red Hat) configured --     resuming normal operations
[Thu Aug 27 16:56:41 2015] [error] [client <ip>] Unable to PUT new contents for /record/helloworld.txt.  [403, #0]
[Thu Aug 27 16:56:41 2015] [error] [client <ip>] (13)Permission denied: An error occurred while opening a resource.  [500, #0]

0 个答案:

没有答案