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
Table of contents Manual deployment 1. Create a s...
Table of contents 1. Solution 2. MySQL character ...
Preface As we all know, HTML5 belongs to the Worl...
Today I installed the MySQL database on my comput...
Preface In the actual use of the database, we oft...
There are always some problems when configuring n...
Despite props and events, sometimes you still nee...
<br />For some time, I found that many peopl...
Install the unzipped version of Mysql under win10...
The specific code is as follows: The html code is...
The office needs Ubuntu system as the Linux devel...
Today I found that WordPress could not connect to...
There are many ways to write and validate form fi...
This article will explain the composition of the ...
What is a Port? The ports we usually refer to are...