When installing Artifactory, you’ll be able to start using it as `http://YOUR_DOMAIN:8081/artifactory. To change this to a simpler domain, you can read the following guide. You’ll need to have the following:
- Artifactory administrative access
- SSH access to the server.
Setting up Reverse Proxy to Simplify Domain
First, SSH into the server and install Apache:
This should create a default page you can access by hitting the root URL:
Now configure the appropriate modules:
sudo a2enmod proxy_http proxy_ajp rewrite deflate headers proxy_balancer proxy_connect proxy_html ssl lbmethod_byrequests slotmem_shm proxy
While logged in as an admin in Artifactory, access
Admin -> HTTP Settings and make the following changes:
After saving, you’ll see the ability to View/Download the configuration on the right side of the page. Download the contents and replace the contents of
/etc/apache2/sites-enabled/000-default.conf on the Artifactory server with them.
Restart Apache with
sudo systemctl restart apache2.
Now confirm that you can request Artifactory using http://YOUR_DOMAIN.
Setting up SSL using Let’s Encrypt
Now that you can access the domain, let’s secure the domain using Let’s Encrypt.
Use the following to check which version of Linux you’re running:
Most likely, you’ll be using Ubuntu 18.04, if so, you can use these steps. If not, check out the CertBot page for appropriate directions.
You should be able to generate and configure the cert automatically running the directions above. Assuming this is successful, select to redirect HTTP traffic to HTTPS, removing HTTP access.
Now confirm that you can both:
- Access the HTTPS version of your domain above.
- When trying to access HTTP, it automatically redirects to HTTPS.