Forum Moderators: phranque
I tried using a virtualdocumentroot command, (not within a virtualhost tag), and that made my www.firstdomain.com and www.seconddomain.com and www.thirddomain.com all show up as the content of www.firstdomain.com.... I guess apache couldn't differentiate because they're on the same IP.
Can someoneone please explain what is broken and why the normal /var/www/html document root doesn't display my pages? Mucho appreciated. - Virtuwul
NameVirtualHost 123.123.123.123:80
You need a tag like this per domain:
<VirtualHost 123.123.123.123>
ServerName domain.name
ServerAlias www.domain.name
ServerAdmin webmaster@domain.name
DocumentRoot /home/user/webfolder
ScriptAlias /cgi-bin/ /home/user/webfolder_html/cgi-bin/
CustomLog path/to/logs/logs_domain.name combined
</VirtualHost>
Something like that. You would need one per domain, make sure the IP matches what DNS says.
HTH :)
Well, setting up virtual hosts would probably work.
But I shouldn't need to set up a virtual host for
every domain I create.
There is something else going on - something probably
outside httpd.conf, perhaps something that the control
panel configures - that tells apache where to look
to get the root before going to the document root.
For example, Cpanel might store web pages in a different folder from ensim..(i'm using ensim)... ...something must
tell apache where these folders are if you leave the
document root as var/www/html in httpd.conf.