Tomcat w/o Apache


#1

Hi All,

Working on porting an older app from centos6/tomcat7/openbd.

I have it running now on Centos7/tomcat8/Lucee

However, I’ve noticed on here that it seems using apache as the front end webserver is the standard. I have no problems with apache and use it in other projects.

I’m feeling stubborn in that I really want to get focused on coding and modernizing this app, not work on adding another layer to the stack. And using Tomcat as the front end has been working ok.

In an effort to not develop in a vaccuum, I want to make sure integrating Apache into the stack is really worth it, especially when I really need to get the application updated and working for a demo before it’s put into production.


#2

I don’t see any harm in leaving it out. Tomcat 8 is pretty versatile compared to it’s younger versions. I’m not sure if there’s any gain to having Apache in front to handle static resources, caching etc. There’s plenty of ways to handle that without. I think one of the biggest things that draw people is the rewrite engine is… simpler. Though that can be read as: more familiar. Tomcat 8 has support for Mod_Rewrite syntax so even that isn’t as relevant of a hurdle these days.


#3

I was looking at nginx, which is something we used heavily at my last job.

Idea was to leave tomcat as the basic webserver, but use nginx to provide load balancing and possibly offload some static resources to it.

This way I could potentially have a single nginx instance, but multiple tomcat instances behind it.


#4

At work we put Apache in front but for my personal apps I use nginx for static serving and rewrites and then proxy Tomcat/Lucee through it. I’ve been doing it that way for a couple of years now and have been happy with it.


#5

If there are no features of Apache that your app requires then I don’t think you need to use Apache just for the sake of it, you could just stick to Tomcat :slight_smile: Similarly, if you do need a web server to handle things and you have more recent experience with nginx then it’s a great choice as a web server (it’s also my preference over Apache in most cases, but not all). There’s no right or wrong answer though, go with what you need or what fits you best.