我的web服务器使用nginx并部署了vue项目,它监听了80个端口,当我使用curl访问我的机器上的网站时,ip地址是172.10.2.200:
curl -i http://172.10.2.200我能得到它:
HTTP/1.1 200 OK
Server: nginx/1.20.1
Date: Wed, 10 Aug 2022 03:12:53 GMT
Content-Type: text/html
Content-Length: 4018
Last-Modified: Wed, 10 Aug 2022 00:22:50 GMT
Connection: keep-alive
ETag: "62f2fa5a-fb2"
Accept-Ranges: bytes
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>title</title><link href="/js/chunk-0429ffa3.c3835ff0.js" rel="prefetch">
.... some elements
</body></html>但是,当我在chrome或其他浏览器中访问它时,会发现503错误:

我试过邮递员,得到了同样的结果:

我的nginx配置如下:
http {
include mime.types;
default_type application/octet-stream;
#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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 60000;
gzip on;
gzip_min_length 10k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 5;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
server {
listen 80;
proxy_ssl_server_name on;
client_max_body_size 1024M;
location / {
root D:\Path_To_Web\Web;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}
}发布于 2022-08-10 03:54:10
我解决了,罪魁祸首是我的代理软件,它拦截我的流量,但不知道这个局域网地址在哪里
https://stackoverflow.com/questions/73300362
复制相似问题