【发布时间】:2020-02-25 01:41:20
【问题描述】:
借助 vscode-remote 和 nginx 反向代理,我有时会进行远程开发
flutter run -d chrome --web-port=4000
我想在 http://localhost:4000 以外的其他 IP 上打开 Flutter Web 开发服务器
我可以用 nginx 和 webpack-dev-server 做到这一点
没有办法在除了chrome之外的其他浏览器中打开(chrome的一些代理依赖)
nginx 配置文件
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
proxy_pass http://localhost:4000;
proxy_set_header Host $host;
}
}
【问题讨论】:
标签: nginx-reverse-proxy flutter-web