Pranay Srivastava
Pranay Srivastava

Reputation: 63

Multiple Virtual Hosts not working

I am trying to set up two virtual hosts for one IP address say xxx.yy.xxx.yyy I have my files on /var/www/html/folder1 and /var/www/html/folder2

I am adding VH like : DocumentRoot /var/www/html/folder1 ServerName xxx.yy.xxx.yyy/folder1 AllowOverride All DocumentRoot /var/www/html/folder12 ServerName xxx.yy.xxx.yyy/folder2 AllowOverride All

As I am new on CentOS7 Apache, can't figure out how to solve it.

Upvotes: 0

Views: 659

Answers (1)

I do not know if I can be helpful but I locally configure so apace to have multiple domains

<VirtualHost q4y.aurecchia.dev:80>
  DocumentRoot "C:\xampp\htdocs\QuestManager\AurQuest4You\public"
  ServerAdmin q4y.aurecchia.dev
  <Directory "C:\xampp\htdocs\QuestManager\AurQuest4You">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
  </Directory>
</VirtualHost>

<VirtualHost csm.aurecchia.loc:80>
  DocumentRoot "C:\xampp\htdocs\CSM TEST\Aur_CSM\public"
  ServerAdmin csm.aurecchia.loc
  <Directory "C:\xampp\htdocs\CSM TEST\Aur_CSM">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
  </Directory>
</VirtualHost>

Upvotes: 1

Related Questions