I'm shopping for a multidomain host. There are those that offer a few, those that offer about 10 and those that offer unlimited domains all for about the same price.
My question is, is there likely to be an quality difference of the service because of this factor. I mean limititing the number of domains helps control how "crowded" the service is in any way or are the unlimited ones simply a better deal with no dissadvantages?
I don't know if it's possible to answer this question in general, thought I'd try...
Usually adding another domain is a matter of adding a few lines to the config. It is unlikely this would impact the performance of the server no matter how many entries you had. What you really need to look at is the amount of server resources they allow you. I would be pretty wary if they offered unlimited transfer / disk space or plans priced at rock bottom prices.
Maybe one of you should try adding 2000 domains in the config.
It does affect the server performance. Not only the little space the server takes up for the virtualhost config, the more domains you have, the faster the file descriptor runs out, the longer apache takes to restart, the more server loads is produced, the more dns queries you will ever get.
That's why I limit the number of domains / subdomains on all my hosting packs. Just keep the server clean and fast. Plus prevent ppl to host domains that they do not ever use ~
Originally posted by YUPAPA Maybe one of you should try adding 2000 domains in the config.
There is a reason mod_rewrite exists. A majority of the issues that you point out are greatly reduced by its use. You should check it out. One virtualhost entry with a few flat text map files is a lot better than 2000 separate entries!
If that's the case, how would you enable logging and splitting the logs for each domain? Because I have to use the logs to produce stats and calculate bandwidth / transfer usage ~
All I know is that rewrite map can be used to do mirrors~ Not that I know it can be done with virtual hosting ~
Specifically the section "Mass Virtual Hosting". You can configure custom logs inside of your VirtualHost directive so the issue is trivial.
I have successfully built out clustered hosting systems that support 40,000+ domains with a single virtualhost entry so I have tested it in the real world. In a clustered setup there is no real alternate than mod_rewrite. Logs do become an issue when you have a clustered setup... but if you are tricky like me it can be worked out!
It will work with suexec but not in the way that you think it would. Normally you can't set the 'user' and 'group' directives when using mod_rewrite. The trick that we did to get around this was create two maps. One is in the format:
The reason why we had to do two maps is because you can only use pairs in the map files. From there it was just a matter of working out our rules to get the correct username, and homedir of the domain in question. Of course all our web users had the same group but I guess you could do the same thing again to determine the correct group as well.