• Resolved jjbwp2017

    (@jjbwp2017)


    Hi folks,

    I’ve been working on settings up my own wordpress site, self hosted. I’ve hit an issue which I can’t seem to solve, so need some help:

    I tried to create a few test posts for my blog but when I hit the Publish button I get taken back to the list of posts and my new post is still in Draft status – not published. I’ve also noticed another issues – that when I try to change the permalink format settings my settings won’t save and keep going back to “Plain”.

    I’m running wordpress with nginx and accessing it from the outside world via an nginx reverse proxy (also used for a number of other web apps I run):

    internet -> nginx reverse proxy -> wordpress (nginx).

    I know I could run wordpress directly on the nginx server currently acting as the reverse proxy, but I’d really like to get by current configuration to work.

    One work-around I’ve had to impliment already is to get the nginx rev. proxy to rewrite the urls. On the wordpress server the site is accessible (within my LAN) at https://wordpress.home/ but via the rev. proxy I want it to be accessible at https://myhost/blog/

    On the rev.proxy server I have the following two location blocks defined:

    location /blog/ {
          proxy_pass              https://wordpress.home/;
     }
     location ~ ^/wp-.*$ {
          rewrite ^/wp-(.*)$ /blog/wp-$1 permanent;
          proxy_pass              https://wordpress.home;
     }
    

    If anybody thinks they can help – please let me know what information you need.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jjbwp2017

    (@jjbwp2017)

    I have just tried to access my site directly on the wordpress server (by-passed rev.proxy and now the publish button works fine. So there must be something wrong with my rev.proxy configuration ….

    Thread Starter jjbwp2017

    (@jjbwp2017)

    Solved it.

    Had to add the following into my nginx reverse proxy configuration location blocks for wordpress …

    proxy_set_header X-Custom-Referrer $scheme://$host/blog$uri;

    The issue was that when I hit the Publish button the browser sends a request for edit.php. The request header contains the “referer” parameter which was incorrect. The above addition corrects this header, to add “/blog/” into the uri before it’s passed on to the back-end server.

    Thanks for sharing the solution!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Publish button not working’ is closed to new replies.