Virtual Hosts configuration has 2 matching modes.
- The "Host:" request header.
- Named connector matching.
Using the Host request header, you would need to know what the hostname and/or port are for the incoming requests, and setup the virtualHosts for those values. (I often just look at the chrome network inspection panel information)
Set those values in the virtualHosts section.
In other words, you have IP 1.2.3.4
A connector on that IP, port 8080
There are 2 hostnames for that IP
Set the virtualHost configurations to those names.
Don't forget to set the hostname only and the hostname:port versions as well.
Also, for those people that insist on using the IP version, like
http://1.2.3.4/index.html, you'll want to decide what webapp you want to display to them, maybe even a 3rd webapp that tells them they messed up and should use the correct name.
If you want to use the Named connector matching, you'll have 2 connectors, then use the named connector matching.
Connector 1, on the internal IP and/or port: with name "internal"
Connector 2, on the external IP and/or port: with name "external"
webapp A: virtualHost of "@internal"
webapp B: virtualHost of "@external"
Just note that using named connectors and virtual hosts would rely on you not accidentally exposing an internal ip:port combo to the outside world, because if they can connect to that ip:port address then they can use whatever webapp that @name is bound to.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users