我在https://saskia.photo上在我自己的服务器上安装了带有Nginx和PHP-FPM的Wordpress

安装工作很好,但XML-RPC(由Jetpack和手机应用程序使用)会引发以下错误:

您可以通过运行自己查看错误

curl -A "Jetpack by WordPress.com" -is -H 'Content-Type: text/xml' --data '

我已经完成了Jetpack’s troubleshooting page但没有运气.

返回的XML错误导致我推测客户端请求XML在nginx和PHP之间的某处被破坏,因此无法解析它.

这是我的nginx配置文件

server {
  listen      80;
  listen      [::]:80;
  server_name saskia.photo;
  rewrite     ^   https://$server_name$request_uri? permanent;
}

server {
  listen                443 ssl http2;
  listen                [::]:443 ssl http2;
  server_name           saskia.photo;
  ssl_certificate       /etc/letsencrypt/live/saskia.photo/fullchain.pem;
  ssl_certificate_key   /etc/letsencrypt/live/saskia.photo/privkey.pem;

  root                  /srv/wordpress/;
  charset               utf-8;

  client_max_body_size 64M;

  # Deny access to any files with a .php extension in the uploads directory
  location ~* /(?:uploads|files)/.*\.php${
    deny all;
  }

  location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;
  }

  location ~* \.(gif|jpg|jpeg|png|css|js)${
    expires max;
  }

  location ~ \.php${
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_index index.php;
    fastcgi_pass  unix:/var/run/php/wordpress.sock;
    fastcgi_param   SCRIPT_FILENAME
      $document_root$fastcgi_script_name;
    include       fastcgi_params;
  }
}

有没有人看到这样的问题或者我的配置文件中发现了问题?
最佳答案
似乎没有安装扩展php-xml和php-xmlrpc.

安装它们:

apt-get install php-xml php-xmlrpc

或(CentOS,RHEL等..)

yum install php-xml php-xmlrpc

dawei

【声明】:淮南站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。