Getting 413 Request Entity Too Largenginx/1.24.0
Hey guys so i have deployed my applications via github, which is laravel app, when i upload images which is only 1.1MB, it said that the request entity too large. How can i solve this? please send me any help since i'm new on deploying and stuff
44 Replies
This is an issue with the default nginx configuration. Your file exceeds the default
client_max_body_size
which can be configured through nginx. I am not 100% sure on how to adjust it within Railway, but adjusting this value would help significantly. Let me see if I can figure it out for you.
This could also be an issue with the php configuration in the container... the php.ini you can change upload_max_filesize
and post_max_size
thanks for replying
btw, how to configure the php.ini? i dont have any file named php.ini, should i create it instead? and pull it to my main branch?
vin is working on a drop in solution, stay tuned
Then let me know if your upload works for you
hey i just lost the solution that u sent me before, could u please resend it?
Brody deleted the message by accident, but could you place a file in the root of your project called
nixpacks.toml
then paste the following in EXACTLY as you see it. Then redeploy and try your upload
okay lemme try it
it wasn’t by accident 🤣
you mean here right
and then i got this
![No description](https://cdn.answeroverflow.com/1194531812635066398/image.png)
Okay, you can remove it. Back to the drawing board for me
![No description](https://cdn.answeroverflow.com/1194532036703174676/image.png)
okayy
Wait no. You didn't commit the file properly
You need to copy everything I sent, exactly how I sent it including the
[phases.setup]
ah okayy wait
sorry my bad bro
still failed vin
\
![No description](https://cdn.answeroverflow.com/1194533807714471946/image.png)
![No description](https://cdn.answeroverflow.com/1194533808003883168/image.png)