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 want to set up the web server at my home. I already have registered for the domain name. I do not want to use hosting services. How should I set up the Apache and the settings with the registrar of the domain name so that my site is up and running?

share|improve this question

3 Answers 3

Please note that hosting at home is disallowed in the Terms of Service by many Internet Service Providers, and some may even disconnect you for this or charge fines.

If you are allowed to home-host according to your provider's terms of service, you should set up a webserver (from your question I already see that your choice has fallen on Apache) at home which runs on your public IP (usually you will need to forward port 80 in your router to your server's internal IP). The installation of Apache differs per operating system. For an easy Apache installation under Windows, I would recommend XAMPP, available at: http://www.apachefriends.org/en/xampp.html

Next, you should point your domain's A record to your public IP. (Hopefully, your ISP provides a static one, which many ISPs which allow home-hosting do). It is recommended to also do this for the www. subdomain.

share|improve this answer
    
Thanks for the reply, Niek! I dont need the website to run 24/7. So dynamic IP should not be a problem. I would use DynDNS or Opendns for that. –  Sarveshwar Jan 3 '10 at 18:44

If you are using Linux, the easiest (but not the best) thing to do is install Apache (and Mysql/PHP if you want dynamic) then install Webmin as this will give you a nice interface to everything.

If using Windows, Try downloading the Web Platform Installer which should get you installed with IIS, SQL Server, ASP.Net (and I think PHP) Very quickly.

Next step would be to go to your DNS records and set an A record for your domain that points to your IP, and a Cname that points to your domain.

Lastly, you want to forward port 80 on your router to the machine that has the webserver.

That should be it! If you do not understand any stage, please say in comments and I will be happy to help.

share|improve this answer
    
Thanks for the reply. Okay, are you saying that I have to set the name server with the registrar? I saw Cname in wikipedia. In the registrar form, it asks to enter two nameservers. How to enter two name servers when I have only one instance of Apache running? Please elaborate. –  Sarveshwar Jan 3 '10 at 18:40
    
Most registrars give DNS services, if yours doesn't, use ns1.everydns.net and ns2.everydns.net and then set up an account with everydns.net and type your domain there. then set an A record with value of your IP and a Cname with the name of www.domain.com and a value of your domain .com if you need any more help, just say. –  William Hilsum Jan 3 '10 at 18:44
    
Thanks for the everydns. –  Sarveshwar Jan 3 '10 at 19:57

A WAMP, or LAMP, depending on your OS, should install everything needed for a website. You then point the DNS at your IP (You DO have a static IP address, right?) and everything should go ok.

share|improve this answer
    
Thanks for the reply. And NO! I don't have a static IP. Very rarely do I shut down my computer which keeps my IP address same for many days. Also I can use some services like dyndns (which my router has builtin support for) or opendns if I continue to have dynamic IP. –  Sarveshwar Jan 3 '10 at 18:30

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.