• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DNS + Apache + Tomcat

 
Daniel Munoz
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a public IP and want to host some applications on my computer. I have set up the DNS for 3 domains, for 3 aplications.
Two of this applications were done using Textpattern (PHP) so i need an apache server. Another application was done in Java, so I need apache.

I have configured jk on apache to server some URL to tomcat, and it is working fine. If i go to http://localhost/javaApp it returns the aplication (everything working fine). If i do http://localhost/phpApp it returns my Php aplication.

After that i configured the DNS for the 3 domains. So if do: www.phpApp.com it returns my PHP aplication. This works for all the php aplications. But if I try: www.javaApp.com it returns a message saying that "Objet not found", Error 404.

My guess is that this is a problem with my configuration of Apache, becuase this message is served by the apache server, I can see all the information of the apache in the bottom of the page: Apache/2.0.55 (Ubuntu) DAV/2 SVN/1.3.1 mod_jk/1.2.14 PHP/5.1.2 mod_ssl/2.0.55 OpenSSL/0.9.8a

I know that my worker.properties file is fine because i can see the tomcat server comunicating with apache when i go to http://localhost/javaApp, so my guess would be (NOT SURE) that the problem is with the virtual host.
This is the code:

NameVirtualHost www.javaApp.com
<VirtualHost www.javaApp.com>
ServerName www.javaApp.com
ServerAdmin kjkjkjkjk@gmail.com

#Alias /housecr /opt/tomcat/webapps/javaApp
#DocumentRoot /opt/tomcat/webapps/javaApp
JkMount /javaApp ajp13
JkMount /javaApp/* ajp13

CustomLog /var/log/apache2/access.log combined
ServerSignature On

</VirtualHost>


This is the first time I try doing this configuration, normally i would just have the 2 servers on two different machines, with 2 different IP address, but at this moment, i do not have the hardware or the IP to do this.. Any help will be greatly appreciated!!

If anyone needs more info on the configuration of apache or tomcat, i can provide it.

daniel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic