Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a apache server running on ubuntu 10.04. i wanted to give the server a name. so i added a name called sdk in /etc/apache/sites-available/sdk with the following

VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName sdk.sat
    ServerAlias *.sdk.sat
    DocumentRoot /var/www
    <Directory /var/www>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

Now, I can access this web address thorught the lan using its ip address But i want it to be accessed by the server name sdk.sat. How can i do this?

share|improve this question
up vote 1 down vote accepted

This depends on how wide you want this domain to work. If this is only for your personal use, you can add the following line to your /etc/hosts, and it would start working on your computer. Unless you are willing to buy sdk.sat from a domain registrar, you would also need to add the same entry to any other clients willing to access the site. sdk.sat

Note that you'd need admin rights to edit the hosts file. So use gksudo gedit /etc/hosts

For any other computer make sure to use a network accessible ip address, such as 192.168.x.y(if its a LAN) or perhaps your internet accessible IP address.

share|improve this answer
excellent! thank you so much! – Ubuntuser Jul 17 '12 at 7:54

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.