Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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>
share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.