redirect - Why is Apache redirecting all domains without a .conf file to one particular domain? -
my company has lamp server, , not expert @ web hosting manage basic tasks.
my server hosts twelve different domains. each domain has .conf
file in sites-enabled
directory, , work fine. let's have example1.com, example2.com, , example3.com, explain question.
recently, person work registered bunch of new domains. domain registrar, pointed domains our ip address. believe called "parking" domain. have not set .conf
file or enabled of these new domains on our server yet. let's newsite1.com, newsite2.com, etc...
what's puzzling me if 1 types 1 of new domains browser, 1 of our existing domain shows up. let's it's example1.com. so, if go browser , type in newsite1.com, or newsite2.com, taken example1.com. also, in address bar @ top of browser, displayed example1.com.
this not desired behaviour. 1 thing, did not choose, far know, example1.com default, , it's not website want default. in case, don't know why system going example1.com opposed example2.com or of our other sites.
the desired behaviour there general error, "this domain not exist" or that. if there has default website, we'd able choose it.
i've seen questions on stack oveflow similar, presume 1 wants set default. when @ configuration files reference, example /etc/httpd/conf/httpd.conf
, empty, in case, there nothing unset.
how stop browsers being redirected website being directed to? how can set apache returns "site not found" error instead of serving website?
the easiest way fix name .conf files starting number.
if @ default apache configs, you'll notice file called "000-default.conf". apache load files in number order - make default virtual host .conf file 000-whatever.conf.
Comments
Post a Comment