1. Phenomenon
2. Solution
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 4096;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 8071;
server_name 101.42.104.247;
location/{
root /home/intelligent_evaluation_of_rock_burst/development_project/dist;
index index.html index.htm;
try_files $uri $uri/ /index.html; //Add this line
}
#Dynamic requests
location /api{
include uwsgi_params;
uwsgi_pass 127.0.0.1:5000;
}
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
Nginx – s reload nginx
Nginx – t test whether nginx is normal
Read More:
- After Vite starts, it will prompt “network: use ` — host ` to expose”, and the service cannot be accessed through network IP
- [Solved] electron Use remote Error: Cannot read properties of undefined (reading ‘BrowserWindow‘)
- “Failed to load resource: net::ERR_FILE_NOT_FOUND” error. The project created by vue-cli 3.0 can run under dev, and an error is reported after packaging, and the page is blank.
- [Solved] Vue item packaging error: Failed to load resource: the server responded with a status of 404 (Not Found)
- How to Solve Node start error listen eacces 0.0.0.0:810
- [Solved] Vite Error: Failed to load module script: Expected a JavaScript module script but the server…
- How to Block a frame with origin from accessing a cross origin frame
- npm ERR code ELIFECYCLE [How to Solve]
- [Solved] ESLint: Parsing error: Unexpected token(prettier/prettier)
- [Solved] VUE3 Error: Error: ENOSPC: System limit for number of file watchers reached
- How to Solve electron import page Error
- OTS parsing error: invalid version tag [How to Solve]
- How to Solve Bat Script Error: system error 85 has occurred
- Vue project change directory run error:Multiple assets emit different content to the same filename index.html
- [Solved] VS Code Error: Vetur can‘t find ‘tsconfig.json‘ or ‘jsconfig.json‘
- How to Set Time Zone in Golang
- [Solved] VUE Error: listen EADDRNOTAVAIL: address not available
- [Solved] SyntaxError: Cannot use import statement outside a module
- JS uses onerror to automatically catch exceptions
- [Solved] Uncaught Error: @electron/remote is disabled for this WebContents