From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,NUMERIC_HTTP_ADDR autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: AWS combined dispatcher Virtual host and URI Date: Mon, 20 Apr 2020 18:09:01 +0200 Organization: Adalog Message-ID: References: <0edc4b64-ac90-463c-920a-3ff92a8be434@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 20 Apr 2020 16:09:00 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="9b68c8ede2de515934f7f75f293192f6"; logging-data="20959"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QKae9FvhbAsB5wXu5lELt" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cancel-Lock: sha1:p74Pz0O2sBYY6XGkLnpvoYYBpGs= In-Reply-To: Content-Language: fr Xref: reader01.eternal-september.org comp.lang.ada:58435 Date: 2020-04-20T18:09:01+02:00 List-Id: Le 20/04/2020 à 16:46, Dmitry A. Kazakov a écrit : > You are using the HTTP header "Host", right? Yes, or more exactly, I access it through the AWS provided function > But if the URI deploys the > IP address like: > >    http://192.168.1.1/gallery > > The host header is meant to serve as an alias, but there is no guarantee > it would work, only if the client cooperates. Virtual hosts are several logical hosts served by the same physical server. Therefore, by definition, there is no way to distinguish if the user provides just the IP address. But this is a red herring. If you give your visitor a URL that works, and the visitor tries something else and it doesn't work, well... too bad for him. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr