解决连接XML-RPC server返回403

tag

前两天发现使用了 Zoundry Raven不能连接到http://example.com/xmlrpc.php ,以为是Zoundry Raven出了问题,重新安装了一次,依然有问题。又用google docs链接,收到 http 403消息。修改chmod值也没有变化,后来才知道服务器采用的是最小权限原则(Principle of least privilege)

功夫不负有心人啊,终于在这篇文章找到了解决办法

最后我编辑drupal根目录下.htaccess文件,增加:

<FilesMatch "^(index|xmlrpc).php$">
Order deny,allow
</FilesMatch>

记事:

正常情况下直接在浏览器中访问http://example.com/xmlrpc.php会得到这样的消息:

XML-RPC server accepts POST requests only.

403会返回这样的消息:

Forbidden

You don't have permission to access /xmlrpc.php on this server.

评论

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 允许HTML标签:<a> <img> <em> <del> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <h1> <h2> <h3> <h4> <h5> <h6> <p>
  • 自动断行和分段。
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.