Welcome! Log In Create A New Profile

Advanced

wordpress: after add comment by a from not authorised user redirect back to page is not work

Posted by uglov_ivan 
Have a dedicated server with nginx+php-fpm+mysql for several WP blogs. Some time ago I found a problem with adding comment from not authorised users. If user is not registred and will try to add comment, comment will be added . But redirect after this is not work. 502 error is displayed.
On Apache 1.3 this problem is not discovered.

config and version:

websrv# uname -a
FreeBSD websrv 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Tue Mar 20 00:53:32 UTC 2012

websrv# /usr/local/sbin/nginx -V
nginx version: nginx/1.0.14
TLS SNI support enabled
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I /usr/local/include' --with-ld-opt='-L /usr/local/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --user=www --group=www --with-debug --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx-access.log --with-http_addition_module --with-http_dav_module --with-http_perl_module --with-http_realip_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-pcre

websrv# /usr/local/sbin/php-fpm -v
Failed loading /usr/local/lib/php/20060613/ZendExtensionManager.so: Cannot open "/usr/local/lib/php/20060613/ZendExtensionManager.so"
[19-Apr-2012 21:57:45] NOTICE: PHP message: PHP Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP 5.3.10 (fpm-fcgi) (built: Mar 21 2012 20:48:15)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

nginx config in atached files.

Where I do mistake?

Thanks,
Ivan
Attachments:
open | download - nginx.conf (1.5 KB)
open | download - site.conf (1.7 KB)
I think it's better to work with an upstream provider, than using the @wordpress named location:

Something along the lines of :

location ~ \.php$ {
try_files $uri $uri/ /index.php;
include fastcgi_params;
fastcgi_intercept_errors on;

# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_index index.php;
fastcgi_pass phpfpm;
}

with upstream defined here as :

upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
#server 127.0.0.1:9000;
}

The stuff in comment is not needed for me on wordpress but I left it there to play with, specifically I think you need index.php on the try_files section:

try_files $uri $uri/ /index.php;

I'm totally not sure this will work but you might give it a chance.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 102
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready