Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

使用 Nginx 映射端口后就不能使用了 #206

Open
WangJincheng4869 opened this issue Aug 14, 2023 · 2 comments
Open

使用 Nginx 映射端口后就不能使用了 #206

WangJincheng4869 opened this issue Aug 14, 2023 · 2 comments
Labels
help wanted Extra attention is needed need more info

Comments

@WangJincheng4869
Copy link

只能使用 vite 端口访问,如果使用 Nginx 代理后访问项目就不能使用了

@alexzhang1030
Copy link
Sponsor Collaborator

上下文可以详细说说吗,例如哪些功能无法使用了,理论上来说,只要代理了 viteDevServer,devtools 也是可以用的

@WangJincheng4869
Copy link
Author

上下文可以详细说说吗,例如哪些功能无法使用了,理论上来说,只要代理了 viteDevServer,devtools 也是可以用的

我的 nginx 进行了全部代理,配置如下

location /basic-paper-cloud {
    proxy_pass http://localhost:5173/basic-paper-cloud;
    include proxy.conf;
}

代理后、通过80访问项目网页上 dev 工具的那个标就不出来了,通过5173就可以看到那个标

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed need more info
Projects
None yet
Development

No branches or pull requests

2 participants