Run web site from home

2

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?

Sarveshwar

Posted 2010-01-03T15:11:36.297

Reputation: 111

Answers

6

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.

Meta Bergman

Posted 2010-01-03T15:11:36.297

Reputation: 1 340

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 – 2010-01-03T18:44:38.380

5

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.

William Hilsum

Posted 2010-01-03T15:11:36.297

Reputation: 111 572

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 – 2010-01-03T18:40:35.627

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 – 2010-01-03T18:44:10.987

2

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.

Phoshi

Posted 2010-01-03T15:11:36.297

Reputation: 22 001

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 – 2010-01-03T18:30:07.520