The last configuration file that needs to be updated is the artifactory-nginx.conf.
After generating the Nginx configuration from the UI “Reverse Proxy Settings”, the following needs to be updated:
- upstream artifactory-direct
- Modify port: 8081 → 8443
upstream artifactory-direct {
server $FIRST_NODE_IP:8443;
server $SECOND_NODE_IP:8443;
} - Location
- Modify proxy_pass: http://artifactory → https://artifactory.
- Modify location.proxy_pass: http://artifactory-direct/ → https://artifactory-direct/.
location / {
proxy_read_timeout 2400s;
proxy_pass_header Server;
proxy_cookie_path ~*^/.* /;
proxy_buffer_size 128k;
proxy_buffers 40 128k;
proxy_busy_buffers_size 128k;
proxy_pass https://artifactory;
proxy_next_upstream error timeout non_idempotent;
proxy_next_upstream_tries 1;
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header X-Content-Type-Options "nosniff" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
location ~ ^/artifactory/ {
proxy_pass https://artifactory-direct;
}
}
After those changes make sure to reload Nginx configuration.