0

I cannot remember if somewhere else I must have a link to my /etc/httpd/conf.d/mycustom.conf file?

I am trying to get two domain names on same IP to link to different folders but so in the url you go to example.com and it goes to one site and when you go to other.net it goes to another site and not the same site as example.com or only be accessible via other.net/site

So now thinking I need two separate custom conf files for virtual hosts?

As it stands when I try and add a virtual host for second site in my one and only conf file it just leads back to first or you have to go to the folder where sites resides.

So for one IP do you require only one custom conf or one for each domain name if you want them directed to different folders?

1 Answer 1

1

You can have multiple domain in virtual host confirmation on httpd.conf file and each domain can have separate folder. Here is an example:

 Listen 80
 <VirtualHost *:80>
     DocumentRoot /www/example1
     ServerName www.example.com

  # Other directives here
  </VirtualHost>

  <VirtualHost *:80>
     DocumentRoot /www/example2
     ServerName www.example.org

     # Other directives here
  </VirtualHost>
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .