Apache2 Ubuntu and Tomcat Web Application Configuration

I use Apache2 (Ubuntu) and Tomcat to serve web applications. Currently, my / etc / apache 2 / ports.conf only has a default listening port (Listen 80). If I use the url http: // hostname: 80 / webAppName , my browser just continues to sync "wait for hostname". I believe that the default port for Tomcat is 8080, I need to add 8080 to ports.conf or change the default port of Tomcats. Any ideas?

+3
source share
4 answers

You are missing Apache HTTPD (a web server, mostly called apache or apache2) and Apache Tomcat (the Java servlet engine)!

tomcat , tomcat ( 8080 http): http://hostname:8080/application

tomcat httpd, httpd - . , .

+1

Tomcat, Googling :

mod-jk; apache 2. , apache tomcat.

apt-get install libapache2-mod-jk

, . /etc/apache 2/apache2.conf

# Worker properties file
JkWorkersFile /etc/apache2/workers.properties

# Logging
JkLogFile /var/log/apache2/mod_jk.log

# Set the jk log level [debug/error/info]
JkLogLevel info

# Log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

employee.properties, , tomcat. tomcat java (8080 ), .

workers.tomcat_home=/usr/local/tomcat/tomcat
workers.java_home=/usr/lib/jvm/java-6-sun
ps=/
worker.list=worker1

worker.default.port=8080
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1

/etc/apache 2/apache2.conf tomcat, . ( ) (.. TestContext apache TestContext tomcat. , apache (awesome) module mod_rewrite.)

# Send servlet for context / TestContext to worker named worker1

JkMount /TestContext worker1
JkMount /TestContext/* worker1

JkMount /AnotherContext worker1
JkMount /AnotherContext/* worker1

apache (/etc/init.d/apache2). , apache (iee http://myserver/TestContext), tomcat.

+1

A web application is a dynamic extension of a web server or application server that provides marketers with the opportunity to recognize people visiting their sites. Web application

0
source

I think this is a suitable solution for changing apache tomcat port numbers. I used this tutorial http://beginlinux.com/server/ubuntu/changing-the-port-on-tomcat and it worked for me.

0
source

All Articles