After reading the article you linked, I think Port Forwarding plus Virtual Hosts isn't the solution either.
As far as I could understand, with Port Forwarding I can only assign an IP to an incoming port. What I want is all the requests to the webapps to be made through one port, and then Zentyal to direct them to the right IP inside my local network.
Each webapp is hosted in a different web server (a different phisical machine) inside my LAN, so they are not virtual but "real" hosts, each having their own IP. The reasons why they aren't all hosted in my Zentyal machine and thus, virtual hosts can't be used, are explained in m first post (they need different libraries, different resources and, in some cases, web servers that are not Apache).
I have to clarify that these apps haven't been made by us, but they are open source ones, so we couldn't choose to make them all compatible or use similar software so that all of them could be hosted in virtual hosts in a same machine.
I have attached a diagram to, hopefully, make it easier to understand what I need. I have to insist that it is already working correctly if the request is made from inside my lan, I just need to make it work the same when somebody makes the same request from the internet.
Please let me know if there is something else that I can explain better.
Thank you again.
Edit: the diagram couldn't be uploaded because some lack of space (not sure what the message meant). I'll try to recreate it here though it will look uglier:
_> webserver1 containing app1.mydomain.com
|
Internet -> Zentyal machine -> Lan -> webserver2 containing app2.mydomain.com
|
_> webserver3 containing app3.mydomain.com
I want that, if somebody from the internet requests app3.mydomain.com, webserver3 to serve it, but if app1.mydomain.com is requested, webserver1 will serve it