Apache Server configuration support - configure for http://domain or http://www.domain

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > March 2005 > configure for http://domain or http://www.domain





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author configure for http://domain or http://www.domain
dave

2005-03-23, 6:11 pm

Can anyone tell me which setting in httpd.conf allows Apache to serve up
both:

http://domain.com
and
http://www.domain.com
as the same site ?

The Apache site is offline (for maintenance) at the moment, and I couldn't
find it in the FAQ's or the google option.

Thanks in advance.


David

2005-03-23, 8:53 pm

dave wrote:
> Can anyone tell me which setting in httpd.conf allows Apache to serve up
> both:
>
> http://domain.com
> and
> http://www.domain.com
> as the same site ?
>
> The Apache site is offline (for maintenance) at the moment, and I couldn't
> find it in the FAQ's or the google option.
>
> Thanks in advance.
>
>

put this in your configuration

ServerName yourdomain.com
ServerAlias www.yourdomain.com

this will do what you want.

-David
Davide Bianchi

2005-03-24, 5:53 pm

On 2005-03-24, David <dwmoar@findmoore.net> wrote:
> put this in your configuration
>
> ServerName yourdomain.com
> ServerAlias www.yourdomain.com


And be sure that both of them are resolved by the DNS to the same IP.

Davide

--
Linux: The choice of a GNU generation
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com