• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems setting up VirtualHost to access a webapp running in a Tomcat/Apache environment

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

 
You can thank my dental hygienist for my untimely aliveness. So tiny:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic