• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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

 
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic