In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you how to solve the error codes in Nginx. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
302 error
Symptom: when nginx uses non-port 80 as a reverse proxy, browser access finds that 302 error is returned
Solution:
/ / if it is proxy_set_header Host $host;//, then change it to proxy_set_header Host $host:$server_post;// without configuration, then add proxy_set_header Host $host:$server_post;// below to add location location ^ / api {proxy_set_header Host $host:$server_post; proxy_pass http://127.0.0.1;}400 error
The nginx400 error is due to the large request header, which is usually caused by a long string written to the cookie. If the cookie is too large, you may need to adjust the large_client_header_buffers (default is 4k)
403 error
Refer to [https://rumenz.com/rumenbiji/nginx-403-forbidden.html]]
413 error 413 Request Entity Too Large
This problem is easy to occur in the process of uploading files, and some of the data passed exceeds the configuration of nginx.
Solution:
Hhtp {client_max_body_size 8M; / / change this value client_body_buffer_size 128k / / buffer size} if the backend is php modify php.inipost_max_size = 8m upload_max_filesize = 6m restart the php service if the backend is SpringbootSpring Boot 1.3.x multipart.maxFileSize=8Mmultipart.maxRequestSize=8MSpring Boot 1.4.x and 1.5.xspring.http.multipart.maxFileSize=8Mspring.http.multipart.maxRequestSize=8MSpring Boot 2.xspring.servlet.multipart.max-file-size=8Mspring.servlet.multipart.max-request-size=8M414 error
414 the URL requested by Request-URI Too Large is too long.
Solution:
Http {client_header_buffer_size 512k; large_client_header_buffers 4 512k;} 499 error
This is a status code defined by nginx to indicate an error: the client closes the http connection before the server returns the http header
The core of the problem is to find out why the server takes too long to process.
Possible questions:
1. The background python program takes too long to process the request
2.mysql slow query
By viewing the monitoring:
1.cpu and memory usage are in the normal range.
two。 Daemon access is normal
3.MySQL does not have slow query.
502 error
502 Bad Gateway: when a server working as a gateway or agent tries to execute a request, it receives an invalid response from the upstream server
504 error
Gateway Time-out: when a server working as a gateway or agent tries to execute a request, it fails to receive a response in time from an upstream server (a server identified by URI, such as HTTP, FTP, LDAP) or a secondary server (such as DNS).
This is how the error code in the Nginx shared by the editor is solved. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.