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
Recently, after refreshing the website, 503 Servi...
Recently the company has arranged to do some CCFA...
This article example shares the specific code for...
This article provides some commonly used rewrite ...
1. Install Howdy: howdy project address sudo add-...
Here are some problems encountered in the use of ...
Original article: Ultimate IE6 Cheatsheet: How To...
I usually use nginx as a reverse proxy for tomcat...
The installation and configuration method of MySQ...
I have found a lot of online resources on this pro...
Table of contents In the React official website, ...
There are three date types in MySQL: date(year-mo...
Table of contents first step: The second step is ...
1. Check whether the existing nginx supports ipv6...
Installation path: /application/mysql-5.7.18 1. P...