harness-drone/docs/setup/nginx.md
2015-10-07 17:17:15 -07:00

931 B
Raw Blame History

Nginx

Using a proxy server is not necessary. Drone serves most static content from a CDN and uses the Go standard librarys high-performance net/http package to serve dynamic content.

If using Nginx to proxy traffic to Drone, please ensure you have version 1.3.13 or greater. You also need to configure nginx to write X-Forwarded_* headers:

location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $http_host;
    proxy_set_header Origin "";

    proxy_pass http://127.0.0.1:8000;
    proxy_redirect off;
}

Our installation instructions recommend running Drone in a Docker container with port :80 published. When behind a reverse proxy, you should run the Drone Docker container with --publish=8000:8000. This will publish Drone to port :8000 allowing you to proxy from :80.