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:
According to the documentation you can put it in http, server, and location.
service nginx restart
And all was well in the world.
Latest posts by Kevin Ohashi (see all)
- WordPress Hosting Performance Benchmarks (2018) - January 30, 2018
- Hostinger’s Fake Reviews – A Guide on How NOT to Promote Your Company - December 6, 2017
- Black Friday and Cyber Monday Web Hosting Deals (2017) - November 21, 2017