Happy WordPress Wednesday! The day of the week dedicated to talking about WordPress.
Or sad, if you had to deal with the problem I ran into today while working on our WordPress blog. I wanted to upload some larger pictures and got a cryptic 'HTTP Error'.
Let me explain the architecture I am running here so that this makes sense. I run Nginx as a reverse proxy and caching server in front of Apache. Nginx forwards traffic to apache when it needs to and serves everything from memory when it doesn't (which is incredibly fast).
Back onto the problem, the error message isn't helpful. I did what I normally do, look at the error log. I didn't see anything in the apache log or the nginx log.
What I did discover was by opening Chrome's developer tools and watching the Network tab I could see the file uploads were failing. They were red and had a status code of 413: Request Entity too Large.
Now I know my httpd.conf (Apache's config file) was set to accept files as big as these images.
So now I had to look at the nginx.conf. What I discovered was nginx's default setting is 1 megabyte. So I added this line to my http configuration within nginx:
client_max_body_size 20m; |
According to the documentation you can put it in http, server, and location.
A quick
service nginx restart |
And all was well in the world.
WordPress & WooCommerce Hosting Performance Benchmarks 2021
WooCommerce Hosting Performance Benchmarks 2020
WordPress Hosting Performance Benchmarks (2020)
The Case for Regulatory Capture at ICANN
WordPress Hosting – Does Price Give Better Performance?
Hostinger Review – 0 Stars for Lack of Ethics
The Sinking of Site5 – Tracking EIG Brands Post Acquisition
Dirty, Slimy, Shady Secrets of the Web Hosting Review (Under)World – Episode 1
Free Web Hosting Offers for Startups