Original link: https://vien.tech/article/138 Preface I used Laravel to make a blog that supports markdown (a side note: it is free and open source, welcome to use VienBlog), and supports file upload. Then when uploading files, I found that files larger than 1M failed to upload because Nginx limits the size of uploaded files. I just need to modify the default upload file size limit of Nginx. Here’s how: We find the Nginx configuration file nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful You can see that the print result is in vim /etc/nginx/nginx.conf Add [...] http { [...] client_max_body_size 10m; [...] } [...] Reload configuration or restart nginx service nginx reload or service nginx restart Congratulations, Coca-Cola, you can do whatever you want. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of MySQL syntax, special symbols and regular expressions
>>: How to start a Vue.js project
Nginx can use the limit_req_zone directive of the...
background As the company's sub-projects incr...
Copy code The code is as follows: <frameset co...
This article mainly introduces the full-screen dr...
Table of contents Preface 1. Deployment and Confi...
1 / Copy the web project files directly to the we...
1. Before configuring the IP address, first use i...
Table of contents 1. Grammar 2. Examples 3. Other...
Although Microsoft has done a lot of research and ...
Preface Not long ago, I combined browser-sync+gul...
Table of contents Global Registration Partial Reg...
1. What is Docker? (1) Docker is an open source t...
Due to the default bridge network, the IP address...
Introduction to Nginx Nginx is a high-performance...
After the container is started Log in to admin fi...