|Re: [jetty-users] virtual hosts jetty v9|
> A request on http://jok.company.com/index.html would be against Host "jok.company.com"
> Set the virtualHost configurations to those names.
I must set it in this block? can you give me the syntax please?
Date: Fri, 17 Oct 2014 17:37:29 -0700
Subject: Re: [jetty-users] virtual hosts jetty v9
Virtual Hosts configuration has 2 matching modes.
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 188.8.131.52
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://184.108.40.206/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.
On Fri, Oct 17, 2014 at 4:20 PM, Jokrummy Pointcom <jokrummy@xxxxxxxxxxx> wrote:
_______________________________________________ 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
Back to the top