Configure Jenkins

Configure Nginx

server {
    listen 80;

    return 301 https://$host$request_uri;

server {

    listen 443;

    location / {

        proxy_set_header        Host $host:$server_port;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;

        # Fix the "It appears that your reverse proxy set up is broken" error.
        proxy_read_timeout  90;


        # Required for new HTTP-based CLI
        proxy_http_version 1.1;
        proxy_request_buffering off;
        # workaround for
        add_header 'X-SSH-Endpoint' '' always;

Setup firewall

Disable direct access through port 8080 with iptables

# run as root
iptables -A INPUT -p tcp --dport 8080 -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport 8080 -j DROP

This means that jenkins will be available on url but not for

results matching ""

    No results matching ""