OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [users@httpd] Virtualhosts


On Tue, Jun 19, 2018 at 8:01 PM Louis <stormy22@xxxxxxxxx> wrote:
>
> Apache 2.4 on Ubuntu 16.04LTS . We have multiple VirtualHosts running on
> port 80, one on port 8080. They are all fully functional...
>
> BUT for the one on port 8080 I have to explicitly append the port number
> to the URL in a browser to access it (or the browser gets the
> 000-default.) No diff between .conf files except Listen 80 | 8080 and
> <VirtualHost *:80> | <VirtualHost *:8080>
>
> How to avoid appending the port number to the browser URL? (I'm sure
> it's simple, but I just can't find it.)
>

The configuration means the config enclosed in the virtualhost will be
used if and only if the server is accessed exactly that way, with the
port 8080 in the browser /  in the HTTP Host: header.

You can use a different hostname in a new *:80 vhost, or a different
interface (127.0.0.1:80) instead of a different port. But something
has to differentiate it if you want the server to handle it
differently.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx