Apache configuration file for redirecting to docker repository and allow https access to Artifactory UI

Here is an example of an Apache configuration file that will allow both redirection for a docker repository and also HTTPS access to the Artifactory UI (don't forget to replace the relevant fields to your own customization 🙂 ).


<VirtualHost *:443>

ServerName docker.jfrogdev.com

ErrorLog /var/log/httpd_error.log

CustomLog /var/log/httpd_access.log combined

SSLEngine on

SSLCertificateFile /etc/ssl/certs/docker-registry

SSLCertificateKeyFile /etc/ssl/private/docker-registry


ProxyRequests off

SSLProxyEngine On

ProxyPreserveHost on

RewriteEngine On

RewriteRule ^/v1/(.*) /artifactory/api/docker/docker-local/v1/$1 [PT]


ProxyPass / http://localhost:8081/

ProxyPassReverse / http://localhost:8081/


</VirtualHost>