virtualhost - How to restrict apache virtual hosts? -
i have 1 site enabled, illustration foobar.com
. when open ip address 127.0.0.1 - it's opens foobar.com
. whatever maps 127.0.0.1 in /etc/hosts
open - foobar.com
opened.
how can configure virtualhost/apache allow access foobar.com
?
apache 2.4, ubuntu 13.10
apache uses first virtualhost "default" host. is, whenever can't map requested hostname (127.0.0.1
in case) specific virtualhost, utilize default one.
just define virtualhost before foobar.com
one. if have both in same configuration, configure default 1 first. if have separate config files, name "default" 1 so, gets loaded before foobar.com
one. many linux distributions utilize name 00-default.conf
default vhost.
apache virtualhost
No comments:
Post a Comment