Join the community today
Become a Member

WordPress - MCP OAuth discovery documents

Discussion in 'Blogs & CMS usage' started by Jon Snow, Sep 17, 2026.

  1. Jon Snow

    Jon Snow Active Member

    930
    191
    43
    Jun 30, 2017
    Ratings:
    +297
    Local Time:
    2:46 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Hi @eva2000

    Does your wpsecure.conf file need adjustments for the new Wordpress 7.1 version?

    From Wordpress Site Heath Report /wp-admin/site-health.php

     
  2. eva2000

    eva2000 Administrator Staff Member

    59,876
    12,544
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,189
    Local Time:
    3:46 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  3. Jon Snow

    Jon Snow Active Member

    930
    191
    43
    Jun 30, 2017
    Ratings:
    +297
    Local Time:
    2:46 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    You're right.

    It looks like WP Rocket adds the site health report.
     
  4. eva2000

    eva2000 Administrator Staff Member

    59,876
    12,544
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,189
    Local Time:
    3:46 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Yeah either, I updated Centmin Mod for this, so try running cmupdate and then run and exit centmin.sh once and see how it fairs
     
  5. Jon Snow

    Jon Snow Active Member

    930
    191
    43
    Jun 30, 2017
    Ratings:
    +297
    Local Time:
    2:46 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Doesn't look like it changed anything. The report is still listed.
     
  6. eva2000

    eva2000 Administrator Staff Member

    59,876
    12,544
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,189
    Local Time:
    3:46 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    restart nginx and php-fpm too
    Code (Text):
    systemctl restart nginx php-fpm

    or
    Code (Text):
    nprestart
     
  7. Jon Snow

    Jon Snow Active Member

    930
    191
    43
    Jun 30, 2017
    Ratings:
    +297
    Local Time:
    2:46 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    I had already ran nprestart and even cleared wp rocket cache, but no change unfortunately :(
     
  8. eva2000

    eva2000 Administrator Staff Member

    59,876
    12,544
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,189
    Local Time:
    3:46 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Are you using WP Rocket ? might need to clear cache from there?
     
  9. Jon Snow

    Jon Snow Active Member

    930
    191
    43
    Jun 30, 2017
    Ratings:
    +297
    Local Time:
    2:46 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Already did that but nothing changed.
     
  10. eva2000

    eva2000 Administrator Staff Member

    59,876
    12,544
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,189
    Local Time:
    3:46 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    contents of your wpsecure.conf?

    Are you using Cloudflare?
     
  11. Jon Snow

    Jon Snow Active Member

    930
    191
    43
    Jun 30, 2017
    Ratings:
    +297
    Local Time:
    2:46 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Same contents. From the last updated timestamp (2024), no updates were made recently.

    Code (Text):
    # prepare for letsencrypt 
    # https://community.centminmod.com/posts/17774/
    location ~ /.well-known { location ~ /.well-known/acme-challenge/(.*) { more_set_headers    "Content-Type: text/plain"; } }
    
    # allow AJAX requests in themes and plugins
    location ~ ^/wp-admin/admin-ajax.php$ { allow all; include /usr/local/nginx/conf/php.conf; }
    
    location ~* ^/(wp-content)/(.*?)\.(zip|gz|tar|bzip2|7z)$ { deny all; }
    
    location ~ ^/wp-content/uploads/sucuri { deny all; }
    
    location ~ ^/wp-content/updraft { deny all; }
    
    # Block nginx-help log from public viewing
    location ~* /wp-content/uploads/nginx-helper/ { deny all; }
    
    # Deny access to any files with a .php extension in the uploads directory
    # Works in sub-directory installs and also in multisite network
    location ~* /(?:uploads|files)/.*\.php$ {
            deny all;
    }
    
    # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
    location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_
    {
            return 444;
    }
    
    #nocgi
    location ~* \.(pl|cgi|py|sh|lua)$ {
            return 444;
    }
    
    #disallow
        location ~* (roundcube|webdav|smtp|http\:|soap|w00tw00t) {
            return 444;
    }
    
    location ~ /(\.|wp-config\.php|readme\.html|license\.txt) { deny all; }

    Yes but I have a Wordpress site on another server that isn't using the orange proxy and it still reports it.
     
  12. eva2000

    eva2000 Administrator Staff Member

    59,876
    12,544
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,189
    Local Time:
    3:46 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Looks like a fairly old version or customized? The new auto fix might skip on detected non-default syntax/content. Try adding the 2 extra rules and restart nginx
    Code (Text):
    # WordPress OAuth discovery start
    location = /.well-known/oauth-protected-resource {
      include /usr/local/nginx/conf/503include-only.conf;
      try_files $uri /index.php?$args;
    }
    
    location = /.well-known/oauth-authorization-server {
      include /usr/local/nginx/conf/503include-only.conf;
      try_files $uri /index.php?$args;
    }
    # WordPress OAuth discovery end
    
     
  13. Jon Snow

    Jon Snow Active Member

    930
    191
    43
    Jun 30, 2017
    Ratings:
    +297
    Local Time:
    2:46 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    It causes nginx not to start until I remove it and restart.

    I don't think I modified wpsecure. But I usually manually create the file with a copy/paste of the latest wpsecure contents from the vhost generator file.
     
  14. eva2000

    eva2000 Administrator Staff Member

    59,876
    12,544
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,189
    Local Time:
    3:46 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    when you use it and doesn't restart what output do you get for nginx debug check command
    Code (Text):
    nginx -t
     
  15. Jon Snow

    Jon Snow Active Member

    930
    191
    43
    Jun 30, 2017
    Ratings:
    +297
    Local Time:
    2:46 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    Result

    Code (Text):
    nginx -t
    nginx: [emerg] location "/.well-known/oauth-protected-resource" is outside location "/wp/" in /usr/local/nginx/conf/wpsecure.conf:43
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed


    I forgot I had a test wordpress site on another domain on the same server:

    Code (Text):
      location /wp/ {
      try_files $uri $uri/ /wp/index.php?$uri&$args;
      index index.php index.html;
    
      include /usr/local/nginx/conf/wpsecure.conf;
      include /usr/local/nginx/conf/wpnocache.conf;
    
         include /usr/local/nginx/conf/php.conf;
         auth_basic "Private";
         auth_basic_user_file /usr/local/nginx/conf/htpasswd_testsetup;
      }