Skip to content

Wordpress is unable to perform loopback requests #1041

@lillian-b

Description

@lillian-b

I run a wordpress server under Unit, and the site health check does not seem to be able to connect back to itself.

When testing the REST API, an error was encountered:

REST API Endpoint: https://hacklab.to/wp-json/wp/v2/types/post?context=edit
REST API Response: (http_request_failed) cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received
image

However, if I su to the unit user and try to curl that same endpoint, it works:

[root@public ~]# su unit -s /bin/bash -c 'curl https://hacklab.to/wp-json/wp/v2/types/post?context=edit'
{"code":"rest_forbidden_context","message":"Sorry, you are not allowed to edit posts in this post type.","data":{"status":401}}

So there is something inside the Unit/PHP process that causes this issue.
How can I debug this?
I cannot find any logs related to this issue (I do see other logs from Unit and Wordpress).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions