• Vimal Roy

    (@vimalroy08)


    Hello,

    We have a website that was created using the premium theme, and we hosted the website on an AWS EC2 instance proxied by Cloudflare. 

    The actual scenario is that when we take this URL, https://strmnftpro.org/blog/ it needs to load the WordPress website from that different server.

    Currently, the site’s WordPress address (URL) is https://48hgg46g9.strmnftpro.org (AWS EC2 instance proxied by Cloudflare and hosted on a separate server), and the site address (URL) is https://strmnftpro.org/blog (the main website is hosted on a different server). PFA (1)

    Both websites are hosted on different servers, and now if we take the https://strmnftpro.org/blog URL, it loads the WordPress website that we hosted on the separate server without any issues. All the pages are working fine.

    However, we are not able to publish edit, or update a post. It shows an error when we click the publish/update button like “Publishing failed. You are probably offline.” PFA(2)

    It shows a lot of 403 Forbidden errors in the console log without stopping. PFA(3)

    How can we solve this issue? Is there any solution for that? How can we run(create, edit, update a post or page) our website without any issues?

    Please check and let us know your thoughts.

    Thanks in advance

    • This topic was modified 5 months ago by Vimal Roy.
    • This topic was modified 5 months ago by Vimal Roy.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Vimal Roy

    (@vimalroy08)

    The issue was fixed by using a classic editor instead of a block editor (installed the classic editor plugin). Now I can create, edit, or update the posts. 

    However, can we also use the block editor without any of the issues I mentioned?

    Moderator bcworkz

    (@bcworkz)

    The reason the block editor has trouble but the classic editor is fine is they each save data using different methods. Classic editor POSTs directly to /wp-admin/post.php. The block editor OTOH POSTs through the REST API at /wp-json/wp/v2/posts/. One is an actual server file and works fine. The other is a virtual path that apparently is being blocked by your site’s configuration. There are likely firewall or modSecurity measures in place preventing POSTs to the API endpoint. The related configuration files need to be modified.

    Thread Starter Vimal Roy

    (@vimalroy08)

    Hello @bcworkz,

    Both are on different servers and domains. So what configuration files do I need to modify? Please give an example, like which file, what configurations, and all. That would be great. The WordPress site is on the Nginx MySQL (LEMP) server.

    Thanks in advance!

    Moderator bcworkz

    (@bcworkz)

    The answer depends on what the cause of the block is. Depending on your hosting situation, these files may be beyond your reach. Also, I’m unfamiliar with the specifics of such things in Nginx, so I’d be unable to tell you in any case. So sorry. I recommend contacting your host for further assistance.

    The requests that are being inappropriately blocked are POSTs to something like https://example.com/wp-json/wp/v2/*

    Thread Starter Vimal Roy

    (@vimalroy08)

    Hello @bcworkz,

    Thank you for the response.

    We are also unfamiliar with the issues and don’t know how to fix them. Anyway, we will research them and try to solve them.

    The preview option is also not working because of the different URLs on the WordPress address and site address. We need to check how we can solve such issues while proxying the website through different servers.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.