0

I know that Tomcat and NginX are both able to host web applications that are defined by war files. But can httpd also host a war-file-based web application on a CentOS 7 server? If so, how would you set that up? Where would you put the war file? Are there security reasons to choose one container over the other? etc.

  • I was going to say you're wrong about nginx, but it does seem like there's a plugin that somewhat does allow java to run "in" nginx: wiki.nginx.org/JavaServers. That said, if you have a war file, you need a java application server to run it. Asking high level general questions is going to be a slow process. If you show what you've done so far and ask specific questions when stuck, that will fit better with the stackoverflow format. As a start, can you install a web server (I would pick apache) and get www.mydomain.com/hello.html to show a web page? – Ian McGowan Dec 10 '14 at 0:25
  • @IanMcGowan Thank you for looking into this. I guess the short version of the question is (on CentOS 7) can I run servlets (a war file) via httpd or do I need tomcat? I have web content running through httpd. I also deployed a war to tomcat on the same server. I am reading intently about tomcat security. I would read about httpd security if it could run servlets/wars, or if httpd is necessary to run alongside tomcat. If httpd cannot run servlets/wars and is not necessary alongside tomcat, I would just delete httpd from the server. All this is high level. – CodeMed Dec 10 '14 at 1:07
  • You need a java app server to run a java app packaged in a war file. You should keep apache, and proxy the requests to the tomcat server (for many reasons, but to be lazy, let's just say 'best practices'). unix.stackexchange.com/questions/99434/… unix.stackexchange.com/questions/21636/… – Ian McGowan Dec 10 '14 at 1:15
  • @IanMcGowan I see that you are a banker. I need to lock down a CentOS web server as tightly as Fort Knox. Can you please point me to some resources for learning banking-grade linux web server security? – CodeMed Dec 12 '14 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.