linux - Why use <VirtualHost> if you have only 1 domain name for the server ? But why can't "ServerAlias" be used w/o a <VirtualHost> -


okay so... tried using

servername something.ooo serveralias www.something.ooo 

but appears..

you can not use serveralias unless used within

<virtualhost *:80> </virtualhost> 

why that?

what happens if server used 1 domain name , there no need "virtual" things. such "virtualhosts" ?

virtualhost designed used multiple sites, however, when using alias, apache assuming have example.com, , wanting widget.example.com. said, because it's www, not mean apache doesn't see "separated" domains, needing virtualhost tag.

this why can use servername, can't use serveralias without virtualhost. www , non-www separated domains.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

node.js - Node - Passport Auth - Authed Post Route hangs on form submission -

Does Firefox offer AppleScript support to get URL of windows? -