I am trying to set up a new
maven repository server (Artifactory). The repository server is deployed as a .war-file in a
Tomcat instance running under Apache.
In order to reach the applications running in Tomcat, we have set up a virtualhost. For Tomcat the config is like this:
<VirtualHost *:80>
ServerName tomcat.foo.com
DocumentRoot /usr/local/tomcat/webapps/
</VirtualHost>
In order to make setup of pom.xml/settings.xml easier I would like to set up a virtual host for my maven repository server as well. Artifactory suggest something like this:
<VirtualHost *:80>
DocumentRoot "/srv/www/httpd/htdocs"
ServerName mavenrepo.foo.com
ProxyPreserveHost on
# Use with Tomcat with the AJP connector
ProxyPass /artifactory/
ajp://localhost:8009/artifactory/
ProxyPassReverse /artifactory/
ajp://localhost:8009/artifactory/
</VirtualHost>
The suggestion does not work.
The link to mavenrepository (somewhat anonymized) is
https://tomcat.foo.com:443/artifactory/. The idea was that by using virtualhost, I should be able to use
http://mavenrepo.foo.com/ and open
the web interface of the mavenrepository automatically.
Due to some weird conflict, we are already running two instances of tomcat. Since the AJP port is not always bound to the same tomcatserver, I cannot be certain that port 8009 goes to the correct
tomcat instance, i.e. 8009 might already be bound when my relevant tomcatserver is started.
We are also running tomcat using the https protocol.
Question 1:
Do any of you have any suggestions of how to set up the virtual server?
Question 2 (just in case I am not doing this correct):
What is the difference between:
/sbin/service httpd reload
and
/usr/sbin/apachectl graceful
The idea is to just reread the config file(s).
Dag