All Projects → Paritosh-Anand → Docker-Httpd-Tomcat

Paritosh-Anand / Docker-Httpd-Tomcat

Licence: other
Apache HTTPD with MOD-JK and Apache Tomcat on Docker

Programming Languages

Dockerfile
14818 projects

Projects that are alternatives of or similar to Docker-Httpd-Tomcat

Mod cluster
mod_cluster is an intelligent native Apache httpd-based and pure-Java Undertow-based load-balancer
Stars: ✭ 88 (+193.33%)
Mutual labels:  tomcat, httpd
Spring Framework Petclinic
A Spring Framework application based on JSP, Spring MVC, Spring Data JPA, Hibernate and JDBC
Stars: ✭ 251 (+736.67%)
Mutual labels:  tomcat
Scouter
Scouter is an open source APM (Application Performance Management) tool.
Stars: ✭ 1,792 (+5873.33%)
Mutual labels:  tomcat
Intermine
A powerful open source data warehouse system
Stars: ✭ 195 (+550%)
Mutual labels:  tomcat
Castlemock
Castle Mock is a web application that provides the functionality to mock out RESTful APIs and SOAP web services.
Stars: ✭ 153 (+410%)
Mutual labels:  tomcat
Uportal
Enterprise open source portal built by and for the higher education community.
Stars: ✭ 221 (+636.67%)
Mutual labels:  tomcat
Tomcat Maven Plugin
Mirror of Apache Tomcat Maven plugin
Stars: ✭ 127 (+323.33%)
Mutual labels:  tomcat
httpd-plus
Add-ons for the OpenBSD web server
Stars: ✭ 32 (+6.67%)
Mutual labels:  httpd
Mapstore2
Modern webmapping with OpenLayers, Leaflet and React
Stars: ✭ 251 (+736.67%)
Mutual labels:  tomcat
Guacamole Install Rhel 7
Apache Guacamole installation bash script for RHEL 7 and CentOS 7 including options for Nginx, HTTPS, SSL, LDAP, Let's Encrypt certificates and more
Stars: ✭ 174 (+480%)
Mutual labels:  tomcat
Tomcat Slf4j Logback
Tomcat, SLF4J and Logback integration Releases
Stars: ✭ 172 (+473.33%)
Mutual labels:  tomcat
Oneinstack
OneinStack - A PHP/JAVA Deployment Tool
Stars: ✭ 1,983 (+6510%)
Mutual labels:  tomcat
Javaee7 Samples
Java EE 7 Samples
Stars: ✭ 2,470 (+8133.33%)
Mutual labels:  tomcat
Cloudunit
The Turnkey DevOps Platform
Stars: ✭ 150 (+400%)
Mutual labels:  tomcat
tomcatplugin
Tomcat plugin for Eclipse
Stars: ✭ 63 (+110%)
Mutual labels:  tomcat
Pdf Books
📚 PDF 书籍库
Stars: ✭ 134 (+346.67%)
Mutual labels:  tomcat
Lyonblog
基于Java8的SSM+Elasticsearch全文检索的个人博客系统
Stars: ✭ 169 (+463.33%)
Mutual labels:  tomcat
Exphub
Exphub[漏洞利用脚本库] 包括Webloigc、Struts2、Tomcat、Nexus、Solr、Jboss、Drupal的漏洞利用脚本,最新添加CVE-2020-14882、CVE-2020-11444、CVE-2020-10204、CVE-2020-10199、CVE-2020-1938、CVE-2020-2551、CVE-2020-2555、CVE-2020-2883、CVE-2019-17558、CVE-2019-6340
Stars: ✭ 3,056 (+10086.67%)
Mutual labels:  tomcat
Library-Spring
The library web application where you can borrow books. It's Spring MVC and Hibernate project.
Stars: ✭ 73 (+143.33%)
Mutual labels:  tomcat
tomcat-native
Mirror of Apache Tomcat Native
Stars: ✭ 73 (+143.33%)
Mutual labels:  tomcat

Apache Web & Application Server on Docker

How things work currently

Most of the application that are built with on-premise datacenter ideology have a setup which involves Apache Tomcat as an application server where the web application is deployed. Along with this there is an Apache HTTPD web server that redirects requests landing on port 80 to the application server which is running on port 8080.

Prime benefits for using HTTPD as web server rather than utilising Tomcat web server capabilities:

  • Better clutering for handling failures of Tomcat instances.
  • Better perfromance of HTTPD in serving static content.
  • Security point of view.

In Terms of Docker

Talking in terms of Docker: the very best practise is to run one-container-per-service that is run one container for web server and another for application server. This is little different from a setup that has a VM machine which in which we are running both web server and application server. We configure web server using mod_jk that enables us to redirect our traffic to the application server.

Apache HTTPD with mod_jk provides load balancing features that can help in load balancing request on multiple backends. Though we have a single backend in most of the cases that is our Apache Tomcat.

While docker-ising a web application mod_jk configurations are very crucial to setup an environment such that web server and application server in two different containers. Also by using mod_jk we can create a setup which have a single container that is running web server and multiple containers running application servers accepting requests from a single web server. This web server is also responsible for load balancing among application servers.

Make clone of this project and run below command.

git clone https://github.com/Paritosh-Anand/Docker-Httpd-Tomcat.git
$ docker-compose up -d

This will invoke two Docker containers

  • An Apache Tomcat container that will host a sample web application.
  • An Apache HTTPD container that will run the httpd web server with mod_jk configuration.

Mod_jk configurations will be pointing the backend to the tomcat container which will have it's AJP connector port exposed. As per Docker compose version 2 by default every container is reachable via other containers, hence the backend host i.e. Apache Tomcat will be already reachable from HTTPD.

Apache HTTPD's port 80 will be mapped to base machine's port via which the user requests will land on our web server. Run below command to find out the base machine's port:

$ docker-compose ps
          Name                         Command               State               Ports
---------------------------------------------------------------------------------------------------
dockerhttpdtomcat_httpd_1   apachectl -k start -DFOREG ...   Up      443/tcp, 0.0.0.0:32776->80/tcp
dockerhttpdtomcat_web_1     catalina.sh run                  Up      8009/tcp, 8080/tcp

Do note: don't make hard-mappings of HTTPD's container port to base machine. It will kill the possiblities of scaling any of the services.

Test the setup from browser on http://localhost:*mapped_httpd_port*.

http://localhost:32776/ -- Apache HTTP default page
http://localhost:32776/sample/ -- Sample web app from Apache Tomcat
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].