I am a really beginner on this topic, I need some helpful articles and your guidance.
I want to build RESTFul API web service. As a http server chosen nginx. But I don’t know (couldnt find any article) anything about how I can redirect my query to my java module, which handles request and gives back in JSON to nginx. If my thoughts on type of back-end is not correct please help me to figure out on this…
I am a really beginner on this topic, I need some helpful articles and
Share
You will need to build your Java service in its own app server — Tomcat would be a good choice for this. From there, it’s a simple matter of configuring
nginxto act as a proxy to Tomcat. Yournginxconfiguration will look something like the following:The important piece here is the setting for
proxy_pass. That’s tellingnginxto accept requests on port 80 and redirect them to port 8080 (Tomcat’s standard port).