Running Jenkins on a Plesk Server is very easy. Drop this in the Additional nginx directives Field in the Apache & NGINX Settings of your (Sub)Domain. This basically tells nginx to pass all Traffic to the Jenkins Instance. In this Example Jenkins is running on, you'll need to change that according to your Jenkins config.

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;
    proxy_redirect          http:// https://;
    proxy_pass    ;
    proxy_http_version 1.1;
    proxy_request_buffering off;

I would also recommend to Disable the "Proxymodus" in the Plesk settings since its designed to Proxy the Request to Apache.

Next Post Previous Post