disbatch

 view release on metacpan or  search on metacpan

etc/disbatch/nginx-default.conf-example  view on Meta::CPAN

# redirect all standard port traffic to ssl
server {
    listen 80;
    return 301 https://$host$request_uri;
}

# redirect non-localhost traffic on port 8080 to ssl
server {
    listen disbatch01.example.com:8080;
    return 301 https://$host$request_uri;
}

server {
    listen       443 ssl;
    server_name  disbatch01.example.com;

    ssl_certificate      /etc/nginx/cert.crt;
    ssl_certificate_key  /etc/nginx/cert.key;

    ssl_session_cache         shared:SSL:10m;
    ssl_session_timeout       10m;
    ssl_protocols             TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers               AES256+EECDH:AES256+EDH:!aNULL;

    location / {
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://localhost:8080;
    }
}



( run in 0.740 second using v1.01-cache-2.11-cpan-39bf76dae61 )