When running Artifactory with Tomcat, we recommend that you set up Apache to proxy Artifactory via HTTP.
You must configure redirects correctly using the PassReverse directive, and also set the base URL in Artifactory itself so that the UI links show up correctly.
The sample virtual host assumes that Artifactory listens on port 8081 and all other services and UI are available on port 8082.
Ensuring HTTP Redirect Works Correctly
For HTTP redirects to work, you must set a PassReverse directive on Apache, otherwise the underlying container base URL is passed in redirects
In the example below it is set to
NPM scoped packages and Apache reverse proxy
To work with NPM scoped packages, you must apply the following configurations in the SERVER block of the Apache reverse proxy configuration.
Add the "nocanon" keyword to the
You can set up Apache with SSL (HTTPS) as a front end to Artifactory using the HTTP protocol.
Configuring a Custom Base URL in Artifactory
When using an HTTP proxy, the links produced by Artifactory, as well as certain redirects might contain the wrong port and use
http instead of
Therefore, you must configure a custom base URL as follows:
- On the Admin tab select Configuration | General
Custom Base URLfield.
- Set the Custom Base URL field to the value used to contact Artifactory
Please refer to General System Settings for more details about configuring the base URL.