3

Connect the apache config files with the command:

include / usr / local / apache / conf / sites / *. conf 

Create a file with two virtualhost.

<VirtualHost *> ServerAdmin [email protected] ServerName site.com ServerAlias site.com DocumentRoot "/var/www/pachko1/site.com" </VirtualHost> <VirtualHost *> ServerAdmin [email protected] 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.

1 Answer 1

6

Try adding NameVirtualHost directives:

NameVirtualHost site.com NameVirtualHost site1.com 

and then add the actual host names to the VirtualHost directives:

<VirtualHost site.com> ... <VirtualHost site1.com> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.