1

I have a server with about 2000 domains on it pointing to same folder.

I put an include file with the domain list into a virtual host entry.

Do I need to make a second include file for www.sales.com wwww.sales2.com etc.. or is there a better way to do this to avoid redundant data and a waste of RAM for apache to load a file twice as large?

I do have access to the dns records if that's a better option.

Lid
  • 15
  • 5

1 Answers1

1

Apache cannot know to serve the hostname unless you put it in its configuration somehow.

If you don't intend to serve a site on the other hostname, then you can simply let it go to the default virtual host and get a 403/404, or you can create a new virtual host that does WWW redirection.

But regardless, you have to decide how these requests should be handled, and then tell Apache about it.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940