Search code examples
wordpressnginxwordpress-jetpack

403 Error on LEMP server when using Wordpress with jetPack plugin


I'm running this server on Centos 6.5 64bits

  • Nginx 1.7.6
  • Php-fpm : PHP 5.6.1 (fpm-fcgi) (built: Oct 3 2014 07:29:26) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

  • MariaDB

  • Nginx runs at 8080 port
  • Varnish Cache at 80 port

I'm using Wordpress 4.0 and jetPack plugin (lastest version)

Here is my problem : I can't connect to any service on Publicize page or Add Contact From (on new post page).

After I click connect, I was redirected to http://www.tienganhratde.com/wp-admin/options-general.php?page=sharing&action=request&service=twitter&kr_nonce=4e2fef354a&nonce=4dadda0619.

And 403 Error Show

But I can request http://www.tienganhratde.com/wp-admin/options-general.php normally.

I already tried these solutions but non of them work:

  • chown -R nginx:nginx /home/nginx/blog
  • CHMOD all files in Wordpress installation folder to 777
  • Re-installed jetPack

Nginx Logs file:

2014/10/16 11:44:29 [error] 20050#0: *356 access forbidden by rule, client: 127.0.0.1, server: www.tienganhratde.com, request: "PURGE /.* HTTP/1.0", host: "www.tienganhratde.com"

Solution

  • The problem is not in server side or wordpress or jetPack. I'm using iTheme Security plugin. And it's cause this problem.

    Trying to determine which setting cause this problem

    • Suspicious Query Strings
    • Non-English Characters
    • Long URL Strings

    Disable these setting to make jetPack function work (and enable after then)