gpt4 book ai didi

Nginx 节点和 WEBrick 配置

转载 作者:行者123 更新时间:2023-12-02 04:53:14 25 4
gpt4 key购买 nike

首先让我说我不知道​​自己在做什么。

好吧,不打扰了,我的问题是:我正在运行 Grunt 的网络服务器来提供前端文件,我正在为数据 api 运行 webrick。 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/

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