Get Reverse Proxy Snippet

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Returns the reverse proxy configuration snippet in text format

Since: 4.3.1

Security: Requires a valid admin user

Usage: GET /api/system/configuration/reverseProxy/nginx

Produces: text/plain

Sample Usage:

GET /api/system/configuration/reverseProxy/nginx
 
## add ssl entries when https has been set in config
ssl_certificate      /etc/ssl/myKey.cert;
ssl_certificate_key  /etc/ssl/myKey.key;
ssl_session_cache shared:SSL:1m;
ssl_prefer_server_ciphers   on;
## server configuration
server {
    listen 443 ssl;
    listen 76 ;
    server_name ~(?<repo>.+)\.jfrog.com jfrog.com;
    
    if ($http_x_forwarded_proto = '') {
        set $http_x_forwarded_proto  $scheme;
    }
    ## Application specific logs
    ## access_log /var/log/nginx/jfrog.com-access.log timing;
    ## error_log /var/log/nginx/jfrog.com-error.log;
    rewrite ^/$ /artifactory/webapp/ redirect;
    rewrite ^/artifactory$ /artifactory/webapp/ redirect;
}