Configuring Primefaces application with glassfish and nginx

July 21, 2016 in Programming, Source Code, Tips & Tricks, Tutorial by admin

primefaces-logoOne of the issues I had these days was installing an Primefaces application in Glassfish application server  running in a container with no external IP address and configuring a nginx front-end for it. While making the two servers work together is just a matter of right configuration files, issues start to pile up when we want to have the context path removed from the nginx. Tried couple of approaches, using URL rewrite, proxy pass, etc, but in the end all of them ended up with links and resource files (ex. CSS files for the themes) not being found. Eventually after many tries ended up with this solution, which (so far) seems to work without any issue. Read the rest of this entry →