question: When developing the Alice management system, I found that all backend interfaces generated 404 errors when requested for the first time, but succeeded the second time. Positioning Problem I checked the nginx error log and found the following error. I mistakenly thought that the error occurred because the At that time, I wondered if there was a port conflict, so I opened the file and found the server { listen 8081; server_name 127.0.0.1; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } server { # Platform port listen 8100; server_name localhost; location / { proxy_pass http://localhost:4200/; } location /api/ { proxy_pass http://localhost:8081/; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } Workaround Change the backend port and the nginx configuration of the project. Remaining issues: When the background is started, the content of accessing The reasons may be as follows: When nginx conflicts with the backend, why does it access nginx internal files in odd numbers and access the backend in even numbers (why can it occupy the same interface)? The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: A brief analysis of mysql index
>>: Detailed explanation of virtual DOM and diff algorithm in react
Step 1: Install the deep "graphics driver&qu...
error message: ERROR 2002 (HY000): Can't conn...
The purpose of setting up MySQL query cache is: C...
This article example shares the specific code of ...
Install boost There are many ways to call C/C++ f...
Table of contents 1. Introduction 2. Several ways...
This article uses examples to illustrate the prin...
Table of contents 1. RegExp object 2. Grammar 2.1...
Rancher deployment can have three architectures: ...
1. Unzip the mysql compressed package to the /usr...
Table of contents 1. Comments on MySQL primary ke...
In daily work, we sometimes run slow queries to r...
Table of contents chmod Example Special attention...
<br />I have compiled some domestic design w...
1. Add the plug-in and add the following configur...