Yesterday the company Android app uploaded a picture exploded the following error
<"-//ietf//dtd HTML 2.0//en "><HTML><Head><title>413 Request Entity Too Large</title></Head><Body><H1>Request Entity Too Large</H1>The requested resource<BR/>/auth/upfile<BR/>does not allow request data with POST requests, or the amount of data provided inthe request exceeds the capacity Limi T.<HR><Address>apache/2.4.7 (Ubuntu) Server at www.baidu.cn Port 443</Address></Body></HTML>
View the parameters of php.ini with Phpinfo
Upload_max_filesize 20mpost_max_size 2M
Well, it looks like post_max_size limits the size of the last file.
So I set the php.ini limit upload file parameters
Upload_max_filesize 100mpost_max_size 8M
Using Phpinfo () to see if the discovery has not changed.
That's odd.
The. htaccess file under the project directory is then set, and the code is added.
<ifmodule mod_php5.c>50</ifmodule>
Again with Phpinfo () Look, this time has changed.
But after uploading, I still report this error.
Embarrassed by my brother.
After listening to the Android reflect that the test server can be uploaded, the official server is not available.
Then you see a hint error with a 443 port.
It dawned on me, is it the reason of https?
Change the keyword to search the data again.
Finally, I found this solution.
Http://stackoverflow.com/questions/18279007/413-request-entity-too-large-on-https
That's it.
In the domain name configuration file, modify the following file is added
<virtualhost *:443> # ... <directory ...> #... # 8M </Directory> </VirtualHost>
Modified Apache server to receive the size of the data buffer, restart Apache done.
Ah haha haha, I am really a genius.
No, this should not be related to HTTPS!!!
My God!!!
"Request Entity Too Large" Upload image size limit