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>

Related Post

3 Responses

  1. Girish says:

    This is a great article. I was able to setup a monitoring service quickly. I have visited a lot of websites and none of them got me to a place where I could monitor my servers this quickly.

    Thanks
    Girish

    Reply
  2. namran says:

    to use snmp to monitor other thing..

    better to get the utils correct with this.

    yum install net-snmp-utils

    and then can test with ..

    snmpwalk -v 1 localhost -c public system

    Reply
  3. looker says:

    Looking forward start investing very soonBeautiful! Great site!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *