Server adres

Discussion in 'Apache' started by Bietje, Jun 17, 2010.

  1. #1
    I have been using apache for a while now, but my server adres is my IP. Wasn't a problem, I made a .tk redirect. But now I made some registration forms which require email activation. The activation link works (ofcourse) only when I mail them a link like "http://myip/register.php?code=132867". I want myip to be my domainname. Now I thinking about buying a domainname. But I still want to use my own apache server. So.. is it really that easy that I buy that domainname, open httpd.conf and change ServerName to my new domainname? Or do I have change/install more?

    Thanks in advance,
    Bietje
     
    Bietje, Jun 17, 2010 IP
  2. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #2
    It is easy. Register a domain name, get the DNS things sorted. If you are not well aware of DNS thing, use your domain registrars name server and ask them to point your domain to your server IP.

    Once done, you need to host the domain on the server i.e.
    a) Add a VirtualHost entry in the Apache configuration file (httpd.conf), having the DocumentRoot set to the directory your website files are in at the moment.
    b) Change the IP of the server to the website name in your website files/databases so all the links will start working using the domain name.
     
    madaboutlinux, Jun 17, 2010 IP
  3. bvsonline

    bvsonline Peon

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    First thing to do is register the new domain name with your domain registrar and point the the name servers to the current server's name server. Once this is done you can easily had the virtual host entry for the domain in the apache configuration.

     
    bvsonline, Jun 17, 2010 IP