Score:0

Migrating IIS webhosting into Glassfish server to avoid firewall issues with clients

bf flag

Currently I have a Glassfish 4 server which hosts an API on port 80 using SSL. Even though it is port 80 it is still using SSL. I did this because we were having issues with clients having their port 8181 blocked on their business networks and thus blocking calls from our Angular front end to the Glassfish back end API.

The Angular front end is being served by IIS over port 443 (ssl).

We made the assumption that most networks would have both port 443 and port 80 open, however we have now run into an issue where a clients network is blocking port 80 traffic.

The only solution I can think of is to move the Angular front end from IIS into Glassfish's docroot folder and have Glassfish serve both the back end API and the front end code.

Firstly, is there any better solution someone has to solve this issue with firewalls blocking ports to back end servers?

Secondly, the Angular code uses a router object which requires a URL rewrite rule to redirect all traffic to the base page. Example: If the angular code is hosted in the "angularApp" folder /angularApp/page/page would need to be redirected to /angularApp/index.html. Currently I dont know of any way to implement a URL rewrite rule in Glassfish specifically for webpages hosted in the docroot folder?

vidarlo avatar
ar flag
Why not use IIS as a reverse proxy for the API?
Curtis avatar
bf flag
@vidarlo because I didnt know i could do that lol. But ya that sounds like it might work... if I could figure out how to set that up. Thanks for the idea.
Curtis avatar
bf flag
@vidarlo thank you i was able to figure it out and set it up and now its working with IIS as a reverse proxy
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.