http error, media upload, wordpress, nginx

I am using uploading files in Wordpress which has been made on top of Raspbian Jessie operating system. I choose nginx to server Wordpress. Now I got this tine little HTTP ERROR while uploading some files. The result is sad and nothing has been uploaded:
Solution is to open nginx configuration file (not virtual host):
vi /etc/nginx/nginx.conf
Make sure there is client_max_body_size 256m; in http section:
#egrep -v "^[[:space:]]*#|^$" /etc/nginx/nginx.conf
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
        worker_connections 768;
}
http {
        client_max_body_size 256m;
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        server_names_hash_bucket_size 64;
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
        gzip on;
        gzip_disable "msie6";
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}
Make sure the the config file is rightly formated:
nginx -t -c /etc/nginx/nginx.conf
This should output:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

5 comments:

  1. AnonymousMay 24, 2021

    Thanks for give us valuable information If you are Looking for WordPress Support , visit on
    WordPress Support

    ReplyDelete
  2. Very Helpful. Thanks for such Information
    WordPress Support

    ReplyDelete
  3. Very Helpful. Thanks for such Information
    WordPress Support

    ReplyDelete