Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just registered a domain name via godaddy.com. Is there some help for a beginner somewhere on how to serve my website on the domain.

To begin with, I want to set it up to display an HTML page running on my local machine via Apache.

How can I do that?

share|improve this question
    
when i tried to visit my website with full url ex: ( www.example.co.in)i am getting lists of files like Index of / exampl.html cgi-bin/ google22c029ceaa9a24f6.html but i just wanted to make display of exampl.html for public when they going enter website adds www.example.co.in for this what i have to do.. plz plz give me solutions. Thank you. –  user127585 Apr 10 '12 at 16:07
add comment

3 Answers

Unfortunately, it is not very simple.

First off, you need some form of hosting. Since you indicate that you want to serve the page from your local machine, that becomes your hosting.

Next, you need to point your domain to your host. Most paid hosting services provide nameservers to point your domain to. In your case, however, you will need to obtain a static IP from your ISP, and manually create an A record using Godaddy's control panel, which points your domain to your static IP.

Then you will need to forward port 80 to the computer running the webserver. Also, since this computer is now publicly accessible on port 80, make sure you are running the latest version of the webserver to reduce any security risks.

Finally, in some home network setups, typing in the domain name from the same subnet as the webserver may not work. Be sure to test your website using an external connection.

Also, DNS changes may take up to 48 hours to propagate across the internet. If your website does not work immediately, wait for some time before trying again. I have noticed that Google's Public DNS servers (8.8.8.8, 8.8.4.4) usually update withing 15 minutes, try using those to test your domain.

share|improve this answer
add comment

You'll need to spend some time reading the Apache HTTPd documentation so that you can configure it to meed your specific needs. Online, there is an example of a simple VirtualHost setup that help to get you started:

In taking from that example, I think you could start out with a much simpler version of it, which I'm posting here:

<VirtualHost 127.0.0.1:80>
  ServerName            www.example.com
  ServerAlias           example.com
  ServerAdmin           webmaster@example.com
  DocumentRoot          /internet/com/example/www
  ScriptAlias /cgi-bin/ /internet/com/example/cgi-bin
  CustomLog             /internet/com/example/logs/access.%Y-%m.log combined
  ErrorLog              /internet/com/example/logs/errors.%Y-%m.log
  <Location />
    AddOutputFilter INCLUDES .html
    Options +Includes +ExecCGI
    DirectoryIndex index.html
    ErrorDocument 404 /404.html
  </Location>
</VirtualHost>

In the above example, it is assumed that you have the following directories created on your system before-hand (your HTML files belong in "www"):

/internet/com/example/www/
/internet/com/example/logs/
/internet/com/example/cgi-bin/

After you have Apache HTTPd configured, and you've tested it by browsing to http://127.0.0.1/ (localhost), you'll need to do the following:

  1. Determine your public IP address (it should be static for running a web server)
  2. Change "127.0.0.1" in the configuration sample above to this IP address
  3. Set up "A" and/or "AAAA" records on your DNS server with this IP address
share|improve this answer
add comment

I don't think you've quite got your terms right, but see if my question over at ServerFault will help.

Basically, you can set up a domain which will then "forward" any requests to the html page being hosted on your home apache server. This will probably need some opening-port-trickery.

share|improve this answer
add comment

Your Answer

 
discard

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.