This section describes how to configure your Artifactory to work with a Reverse Proxy server.
NGINX and Apache Reverse Proxy Requirements
To use NGINX as a reverse proxy to work with Docker, you need NGINX v1.3.9 or higher. The NGINX configuration file should be placed under the
sites-enabled
directory. For more information, see Configuring NGINX.To use Apache as a reverse proxy server, you need to have a set of modules installed and activated. For more information see Apache Requirements with Reverse Proxy Configuration . For additional guidance on configuring Apache reverse proxy support, see Configure Apache.
To configure reverse proxy settings for Artifactory:
In the navigation panel on the left-hand side of the screen, click Administration .
In the General pane, click HTTP Settings. The HTTP Settings screen appears.
Under Server Provider, select a service provider, for example Nginx. Reverse Proxy settings are displayed.
Configure settings as required. Refer to the parameters in the table Table 1, “Reverse Proxy Settings” below, then click Save.
Click
Download
to generate a reverse proxy snippet (configuration file).Place the configuration file in the right place under your reverse proxy server installation and reload the configuration.
For example, Nginx Server Provider: Place the configuration file (rt.conf) in the
/etc/nginx/conf.d
.
Best practice
When using a reverse proxy, it is recommended to pass the X-JFrog-Override-Base-Url
header as follows:
For NGINX:
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$<host>:<server port>
For Apache:
RewriteCond %{REQUEST_SCHEME} (.*)
RewriteRule (.*) - [E=my_scheme:%1]
[...]
RequestHeader set X-JFrog-Override-Base-Url %{my_scheme}://<server_name>
Field | Description |
---|---|
Server Provider | Set the server provider type: Embedded Tomcat, Nginx and Apache. |
Internal Hostname | The internal server name for Artifactory which will be used by the web server to access the Artifactory machine. If the web server is installed on the same machine as Artifactory you can use localhost, otherwise use the IP or hostname. |
Internal Artifactory Port | Direct access to Artifactory for REST API and downloads. This can be configured from the Artifactory System YAML file. |
Internal Router Port | Access to the JFrog Platform services REST API and web UI. This can be configured from the Artifactory System YAML file. |
Public Server Name | The server name which will be publicly used to access Artifactory within the organization. |
Use HTTP | When set, Artifactory will be accessible via HTTP at the corresponding port that is set. |
Use HTTPS | When set, Artifactory will be accessible via HTTPS at the corresponding port that is set. |
HTTP Port | The port for access via HTTP. The default value is 80. |
HTTPS Port | The port for access via HTTPS. The default value is 443. |