# Problem with apache config file



## dpalme (Dec 14, 2009)

Apparently I have a problem with the apache config file.  

For one of the domains we have a subdomain that has the following directives in the /usr/local/etc/apache22/extra/httpd-vhosts.conf file:


```
<VirtualHost 64.150.176.124:80>
    ServerAdmin webmaster@dougpalme.com
    DocumentRoot "/home/dougpalme/www/data"
    ServerName dougpalme.com
    ServerAlias www.dougpalme.com
    ScriptAlias /cgi-bin/ "/home/dougpalme/www/cgi-bin/"
    ErrorLog "/home/dougpalme/www/logs/error_log"
    CustomLog "/home/dougpalme/www/logs/access_log" combined
</VirtualHost>
<VirtualHost 64.150.176.124:80>
   DocumentRoot "/usr/local/www/squirrelmail"
   ServerName webmail.dougpalme.com
</VirtualHost>
<VirtualHost 64.150.176.124:80>
    DocumentRoot "/home/dougpalme/www/data/blog"
    ServerName blog.dougpalme.com
</VirtualHost>
```

However, when I try to access blog.dougpalme.com it directs me to the site that is defined at the top of the config file.....

I have looked at this a zillion times and cannot figure out what I have messed up so any help would be appreciated.


----------



## Wiedmann (Dec 14, 2009)

There is a:

```
NameVirtualHosts 64.150.176.124:80
```
missing.



> However, when I try to access blog.dougpalme.com it directs me to the site that is defined at the top of the config file.....


The same problem you have for "webmail.dougpalme.com" at the moment.


----------



## dpalme (Dec 14, 2009)

I am not sure what you mean by name virtual host missing.

Now when I try to access mail.dougpalme.com and blog.dougpalme.com it directs me correctly.

I am really getting confused now.


----------



## dpalme (Dec 14, 2009)

Ok I just tried them again, blog.dougpalme.com is appears to be working, but mail.dougpalme.com is not....

And I was wrong on the mail.dougpalme.com that should be webmail.dougpalme.com which is working....

This is crazy LOL


----------



## dpalme (Dec 14, 2009)

```
NameVirtualHost 64.150.176.124:80
```

Appears on the line right before the first Virtualhost directive.

Here is the first few lines:

```
NameVirtualHost 64.150.176.124:80

<VirtualHost 64.150.176.124:80>
    ServerAdmin webmaster@timelessequine.com
    DocumentRoot "/home/timeless/www/data"
    ServerAlias www.timelessequine.com
    ScriptAlias /cgi-bin/ "/home/timeless/www/cgi-bin/"
    ErrorLog "/home/timeless/www/logs/error_log"
    CustomLog "/home/timeless/www/logs/access_log" combined
</VirtualHost>
<VirtualHost 64.150.176.124:80>
    DocumentRoot "/usr/local/www/squirrelmail"
    ServerName webmail.timelessequine.com
</VirtualHost>
```


----------



## Wiedmann (Dec 14, 2009)

> However, when I try to access blog.dougpalme.com it directs me to the site that is defined at the top of the config file.....


Hm, I get a different content for dougpalme.com and blog.dougpalme.com.


----------



## dpalme (Dec 14, 2009)

What content are you getting?


----------



## dpalme (Dec 14, 2009)

dougpalme.com should be a under construction page correct? blog.dougpalme.com should be showing a blog/website content correct?


----------



## Wiedmann (Dec 14, 2009)

> dougpalme.com should be a under construction page correct? blog.dougpalme.com should be showing a blog/website content correct?


That's what I get.


----------



## dpalme (Dec 14, 2009)

Then everything is working again.....strange.....ok we can close this thread, I am apparently losing my mind.


----------



## malexe (Dec 14, 2009)

nevermind.


----------

