Connect the apache config files with the command:
include / usr / local / apache / conf / sites / *. conf
Create a file with two virtualhost.
<VirtualHost *>
ServerAdmin webmaster@as.com
ServerName site.com
ServerAlias site.com
DocumentRoot "/var/www/pachko1/site.com"
</VirtualHost>
<VirtualHost *>
ServerAdmin webmaster@as.com
ServerName site1.com
ServerAlias site1.com
DocumentRoot "/var/www/site1/site1.com"
</VirtualHost>
But when accessing site1.com always opens a folder of site.com.
If they are interchanged, when referring to site.com will open site1.com
Always works feather rule, why is this happening?
Sorry for my English.
Try adding
NameVirtualHostdirectives:and then add the actual host names to the
VirtualHostdirectives: