Welcome! Log In Create A New Profile

Advanced

NGINX -500 error on form submission

Posted by neodjandre 
NGINX -500 error on form submission
July 29, 2019 09:33AM
We are getting some errors from an IP address (500 Internal Error on POST event and upstream response buffer) and we don't know if this a genuine client trying to submit our contact form or a spam bot. The logs show the following information:

[code]
25/07/2019
19:23:28.000 +0100
77.243.191.40 - - [25/Jul/2019:19:23:28 +0100] "POST /contact/ HTTP/1.0" 500 91888 "https://www. example.com/contact/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36 OPR/53.0.2907.99"
Host: example Name: /var/log/nginx/access.log Category: nginx
2 25/07/2019
19:23:27.000 +0100
77.243.191.40 - - [25/Jul/2019:19:23:27 +0100] "GET /contact/ HTTP/1.0" 200 91888 "https://www.example.com/contact/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36 OPR/53.0.2907.99"
Host: example Name: /var/log/nginx/access.log Category: nginx
3 24/07/2019
18:00:49.000 +0100
2019/07/24 17:00:49 [warn] 20454#20454: *68024 an upstream response is buffered to a temporary file /var/lib/nginx/fastcgi/2/39/0000000392 while reading upstream, client: 77.243.191.40, server: , request: "GET /contact/ HTTP/1.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.example.com", referrer: "https://www.example.com/contact/"
Host: example Name: /var/log/nginx/error.log Category: nginx
4 24/07/2019
17:00:50.000 +0100
77.243.191.40 - - [24/Jul/2019:17:00:50 +0100] "POST /contact/ HTTP/1.0" 500 105548 "https://www.example.com/contact/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
Host: example Name: /var/log/nginx/access.log Category: nginx
5 24/07/2019
17:00:49.000 +0100
77.243.191.40 - - [24/Jul/2019:17:00:49 +0100] "GET /contact/ HTTP/1.0" 200 105521 "https://www.example.com/contact/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
Host: example Name: /var/log/nginx/access.log Category: nginx
[/code]

Our main configuration NGINX file is as follows:

user www-data;
worker_processes 2;
pid /run/nginx.pid;
worker_rlimit_nofile 100000;

events {
worker_connections 2048;
multi_accept on;
}

http {

##
# Basic Settings
##

client_header_buffer_size 2k;
large_client_header_buffers 2 1k;

client_body_buffer_size 10M;
client_max_body_size 10M;

client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 15;
send_timeout 10;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# Logging Settings
##

map $http_user_agent $bot_in_log {

~Pingdom 0;
~Preload 0;
~Googlebot 0;
~Baiduspider 0;
default 1;

}

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";
gzip_proxied any;
gzip_buffers 16 8k;
gzip_comp_level 4;
gzip_http_version 1.0;
gzip_min_length 1280;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss a$
gzip_vary on;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

}

I have read on another thread this might help with buffer overruns but I am not sure if I should add this to our config. We are running a wordpress site.

proxy_buffers 16 16k;
proxy_buffer_size 16k;
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 68
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready