nginx - 如何让 Drone.io 在特定路径上运行?

标签 nginx continuous-integration

我想让我的无人机安装在我的 nginx 服务器后面运行。我想在 http://host/drone 下访问它,但它似乎没有获取路径选项。

我的 nginx 配置如下所示:

server {
    listen 80;
    server_name myhost.io;

  location ~ ^/drone/(.*)$ {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $http_host;

    proxy_pass http://localhost:8042/$1;
    proxy_redirect off;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }
}

我的配置文件是这样的:

DRONED_OPTS="--port=:8042 --path='/drone'"

感谢您的帮助!

最佳答案

Brad Rydzewski发现,--path选项仅适用于sqlite数据库的路径,而drone不能在子树中运行。

关于nginx - 如何让 Drone.io 在特定路径上运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22438047/

相关文章:

networking - Nginx:直接以text/plain形式返回$remote_addr

jquery - 当 Tornado 应用程序的多个实例在数据库中插入项目时,如何避免在 MongoDB 中重复插入?

continuous-integration - 如何在 1 个作业中定义 2 个具有不同 when 条件的工件?

mongodb - 设置多个 Docker 容器和 MongoDB 以在 CircleCI 中运行

Jenkins 使用基于主干的开发时构建

android - 在 github 操作工作流程中下载操作存储库 'r0adkll/sign-android-release@v1' 时出错

wordpress - 反向代理到 WordPress 容器

ruby-on-rails - nginx 不在 ssl 中提供 rails Assets

django - uwsgi_pass 不转发 SCRIPT_NAME header

bash - Github 操作 : Why an intermediate command failure in shell script would cause the whole step to fail?