Making www and @ point to the same servername in apache

Sometime we just can’t control the client is accessing our website either
via www or just without www.

In virtualhost setting for apache this can be done by adding the following line into
httpd.conf

<VirtualHost *:80>
    ServerAdmin webmaster@namran.com
    DocumentRoot /home/namran/public_html/namran.com
    ServerName namran.com
    ServerAlias www.namran.com
 
    ErrorLog logs/namran.com-error_log
    CustomLog logs/namran.com-access_log common
 
</VirtualHost>

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Like

Related Post

2 Responses

  1. HawkEYE says:

    so far..
    snmpd still could not talk properly with the mrtg ..
    hahaha..
    ding dong..

    going to attend to it later.. just formatted my CentOS4.5 ‘s laptop..

    Reply
  2. HawkEYE says:

    so far..
    snmpd still could not talk properly with the mrtg ..
    hahaha..
    ding dong..

    going to attend to it later.. just formatted my CentOS4.5 ‘s laptop..

    Reply

Anything to add?

X