Suppose I have many websites with different domain names, domain1.com
, domain2.com
, etc. I have setup the correct virtualhosts configuration for these sites in wildfly. The correct DNS entries are also in place. How do I route requests to my server for these domains to wildfly?
Do I simply run wildfly on ports 80 and 443? Something tells me this is a bad idea as wildfly does not run on these ports by default. To run wildfly on those ports require binding to those ports as a privileged user and then switching to an unprivileged user. The hassle and difficulty of doing this suggests that this isn't right.
Do I run wildfly behind nginx or apache2? My app spins up websites and virtualhost config dynamically. Can I just forward all requests to wildfly and let it deal with it?
???