Hi, On Wed, Feb 1, 2017 at 10:21 AM, John English <[email protected]> wrote: > Here's what I see in my request logs, which shows the problem more clearly. > I have a 404 page in my webapp, and I define a list of virtual hosts. Here's > what I see in the request log: > > Request to 127.0.0.1 (which is listed as a valid virtual host): > 127.0.0.1 - - [25/Jan/2017:16:48:51 +0000] "GET /foo HTTP/1.1" 404 666 > > Same request to 127.0.0.2 (which isn't): > 127.0.0.1 - - [25/Jan/2017:16:53:32 +0000] "GET /foo HTTP/1.1" 404 0 > > So the request to the valid virtual host name gives me 666 bytes (the 404 > page specified by my webapp), whereas the same request to an invalid > hostname gives zero bytes. > > (I've just done some more experiments, and moved my webapp from a context > path of "/" to "/x" -- I discovered that the same thing happens for *all* > 404s not handled by my webapp.) > > Any ideas what I need to do to configure the generic 404, as opposed to my > webapp's 404?
Do you have a webapp that answers to the 127.0.0.2 virtual host (or that has no virtual hosts and therefore answers to them all) ? If not, because you always use specific virtual hosts for your webapps, then you can have a super-simple webapp deployed at "/" with no virtual hosts whose only page displays a 404 message. -- Simone Bordet ---- http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. _______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
