I've spend half a day.
I have web application http://one on port 80 and site collection on it. I create second web application with separated site, http://two on port 80(url is added in A-records). Want to create root site collection on http://two.
Cannot create site collection in GUI(it adds "/sites/" managed path, which I don't want to).
Cannot create via powershell, tried like this
New-SPSite http://two -OwnerAlias "domain\sp_admin"-Name "Home" -Template
STS#0
or like this
$w = Get-SPWebApplication http://two;
New-SPSite http://two -OwnerAlias "domain\sp_admin" -HostHeaderWebApplication $w -Name "Home" -Template STS#0
..it says
New-SPSite : The URL 'http://bussy' is in use as an alternate access URL or as the URL of a host header site. Please choose a different URL and try again.
..I cannot delete address from AAM's becouse of
remove-SPAlternateURL : You cannot delete the default zone alternate URL.
It does not want to remove from default zone becouse of error "something went wrong" and deletes from there only with deleting whole webApp..
I looked in Central Admin in Appl-on Management-> Managed Path. There are "(root)" and "sites" checkboxes, but I don't understand what they really do( It does not change something if I add "(root)"..
and so on)
upd.: my problem was in the other plane - LoopbackCheck.
I created WebApps and site collections in powershell, script gave me some errors and because of turned on LoopbackCheck - I wasn't able to log in to site collection. It pointed me in a wrong way and I decided that there was error and site collection does not exists. But it was created and existed :) so GUI proposed me only "/sites/" option).
Option to turn Loopback check off in powershell:
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword