My apache2 config file (/etc/httpd/conf/httpd.conf ) doesn't work as I expect.

I want http://flowerchildevents.com/ to map to /home/webuser/helloworld/htdocs/ and www.searchstream.co/ to map to /var/www/html

however both sites map to /var/www/html

any ideas? thanks in advance.

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName www.searchstream.co
    <directory /var/www/html/>
            Options Indexes FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
    </directory>
</VirtualHost>

<VirtualHost *:80>
        DocumentRoot /home/webuser/helloworld/htdocs/
        ServerName www.flowerchildevents.com
        ServerAlias *.flowerchildevents.com
    <directory /home/webuser/helloworld/htdocs/>
            Options Indexes FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
    </directory>
</VirtualHost>
link|improve this question
feedback

1 Answer

From what I can see you have actually never told the VirtualHost in question that it should be aware of the name flowerchildevents.com. Try adding that explicitly as a ServerAlias.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown