Skip to content

Instantly share code, notes, and snippets.

@zekgyn
Forked from ricardoaugusto/fix.md
Last active October 22, 2024 11:18
Show Gist options
  • Select an option

  • Save zekgyn/314e99edba4ac0a62b2894c99b7d4ec6 to your computer and use it in GitHub Desktop.

Select an option

Save zekgyn/314e99edba4ac0a62b2894c99b7d4ec6 to your computer and use it in GitHub Desktop.
Increases the upload size on Laravel Nginx installation, fixes the 413 request entity too large and PostTooLargeException

Edit the file php.ini (or PHP FPM if on Forge):

memory_limit = 512M

post_max_size = 20M

upload_max_filesize = 20M

Edit the nginx.config:

client_max_body_size 20M;

Restart nginx and PHP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment