Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the problem of ngin agent accessing multiple projects and using 404,500 after deployment

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "how to understand the ngin agent to access pictures of multiple projects, the use of deployment after the problem", the article explained the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "how to understand the ngin agent to access pictures of multiple projects, the use of deployment after the problem of 404500" it!

Use nginx instead of tomcat to access the pictures on the server

Add location / image/ {alias / usr/share/test/image/;} to server {} in the nginx.conf file, where / image/ is the access path after port I

Used by multiple projects

In the configuration of nginx, server represents one agent, multiple server if multiple agents are needed.

404 500 issues after deployment

Generally, if there are no errors in systemctl status nginx, but if you have access to 404500, you should look at the error.log file and your own error.log file, which is error_log / var/log/nginx/error.log in the nginx.conf configuration. My own mistake is that the specific error messages found in this file can not be reproduced. I forgot which one is 404, but it should also help. One is @ router (why I didn't eat a few more English books at school) and then saw that my @ router configuration wrote location @ router {rewrite ^. * $/ index.html last. } change to location @ router {rewrite ^. * $/ index.html break;} and there is no access, which is relatively rare. I have only encountered the solution in the domestic operating system, that is, the user nginx; at the beginning of the configuration file. There are some nginx permissions that cannot be changed to user root. Root permission is required. Will this lead to security problems? thank you for reading. The above is the content of "how to understand how the ngin agent accesses multiple projects of pictures and uses 404,500 after deployment". After the study of this article, I believe you have a deeper understanding of how to understand how ngin agents access multiple projects of pictures and use 404500 after deployment. The specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report