<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Autoai Pal</title>
    <description>The latest articles on DEV Community by Autoai Pal (@autoaipal).</description>
    <link>https://dev.to/autoaipal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1116116%2F3b914202-ac81-42ca-98c0-fadf4250eae4.png</url>
      <title>DEV Community: Autoai Pal</title>
      <link>https://dev.to/autoaipal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/autoaipal"/>
    <language>en</language>
    <item>
      <title>How to Resolve Error 413 Request Entity Too Large in Nginx and Amazon EC2 Instance</title>
      <dc:creator>Autoai Pal</dc:creator>
      <pubDate>Sun, 09 Jul 2023 06:30:13 +0000</pubDate>
      <link>https://dev.to/autoaipal/how-to-resolve-error-413-request-entity-too-large-in-nginx-and-amazon-ec2-instance-341h</link>
      <guid>https://dev.to/autoaipal/how-to-resolve-error-413-request-entity-too-large-in-nginx-and-amazon-ec2-instance-341h</guid>
      <description>&lt;p&gt;while running on Amazon server instance with Nginx, at some point you might come across an HTTP 413 error that says &lt;/p&gt;

&lt;p&gt;&lt;code&gt;request too large&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This means that the upload max size has been exceeded. To solve this error follow the steps below&lt;/p&gt;

&lt;h2&gt;
  
  
  How To solve NGNIX 413 Request Too Large Error
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Login to your server via ssh&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;open the Nginx config file via nano or your favorite text editor. we will use nano for this tutorial&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;sudo /etc/nginx/nginx.conf&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add this code to the HTTP block &lt;br&gt;
&lt;code&gt;client_max_body_size 20M;&lt;/code&gt;&lt;br&gt;
Increase the size as you want&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;save the file and close the editor&lt;br&gt;
Run this command to restart Nginx&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl restart nginx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now go back and retry the upload again,  and it will work&lt;/p&gt;

&lt;p&gt;What we have done is increase the maximum allowed file upload size to &lt;strong&gt;20 megabytes&lt;/strong&gt;. This way any file less than or equal to &lt;strong&gt;20M&lt;/strong&gt; will be uploaded&lt;/p&gt;

&lt;p&gt;So feel free to adjust the value to your need&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>aws</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
