gpt4 book ai didi

Nginx 节点和 WEBrick 配置

转载 作者:行者123 更新时间:2023-12-02 21:51:56 26 4
gpt4 key购买 nike

首先我要说的是,我不知道自己在做什么。

好吧,既然这样,我的问题是:我正在运行 Grunt 的网络服务器来提供前端文件,并且正在运行 webrick 来提供数据 api。 Grunt 使用 grunt-connect-proxy 将数据请求代理到 webrick。在开发过程中,我让 grunt 服务器监听端口 9000,webrick 监听端口 3000。

我想让这个工作流程与 Nginx 一起工作,但我不知道如何去做......如果有人知道如何设置适当的配置文件,你的帮助将是无价的。

最佳答案

server {
server_name example.com;
location / {
proxy_pass http://127.0.0.1:9000;
proxy_set_header Host $host;
}
}

添加您需要的任何其他规则

关于Nginx 节点和 WEBrick 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18452074/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com