Dynadot

Tutorial - How to host your website on your computer

Spaceship Spaceship
Watch

cancer10

Account Closed (Disallowed)
Impact
6
Hi,

This is a tutorial on how to host your website on your PC.


1) Download CIS WebServer from Here

2) Install it (its very easy to install like other programs).

3) After installation, run the program from Start > Programs > CIS WebServer > CIS WebServer.exe. You will see a screen similar to the following:

screenshot_webserver.jpg


A little description about each of the controls.

* Status = Current status of the server.
* Site Hits = Total hits your site got till now.
* Users Connected = Total unique visitors connected to your site.
* Bytes Sent = Total size of packets sent from your PC.
* Bytes Received = Total size of packets received to your PC.
* Server Uptime = Total time since the server is running.
* Local Address = Is the local server address which can be accessed through LAN. or you can use http://localhost/ instead.
* Your Site Located At = This is the IP address through which your site can be viewed on LAN and Internet.
* Connected IP Address = Visitors IP address who has visited your site with Date and Time.
* Save Auto Log = Automatically save logs of the visitor's IP address.
* Enable IP Listing = Enables IP listing in the listbox. If unchecked does not logs any IP addresses.


4) Click on the Settings button > Set path

5) Clicking on the Set Path shows you another window, where in you can select the Drive > Directory name where you have your index.html file. (index.html file is the main file that shows as your default homepage)

6) Click on Settings > Preferences > HTTP Options.

You can set the Preferences of your web server. You can set your desired Port number. But it is recommended that you set your Port number to 80. You can enable a music file if you want it to play when a user visits your site. Checking on Run on Startup enables your WebServer to run automatically when Windows Starts. You can ban IP address of your visitors. Press Ban IP to show the Ban IP window. Click Save to save the settings.

7) You are done. Open your browser and type http:// followed by your IP address. or you can simply click on the Your Site is Located at link on the web server. You can see your index.html file in this way.
 
1
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
RickM said:
Hosts that chage $5 a month dont provide a server per customer. They have about 2000 customers on a server, so yes....it is ok for hosts to charge $5 a month.
2,000? Erm, which hosts do that?

200-300 is standard.

2,000 would be insane? :)

Even if each customer added just 0.005 to the server load, loads would average at over 10 (with 2,000 customers).
 
Last edited:
0
•••
Depends on the hardware and the use of the sites. The main cause of load is disk access. With an array of fast disks, and plenty of RAM for disk caching, a host could perhaps reach 2000 sites on a server.
 
0
•••
qbert220 said:
Power costs will be probably between $10 to $30. But there will be many other sites sharing the same server, all contributing to the power costs. 100 sites on a server means that each pays perhaps 20 cents per month on power. If you run the same server at home 24/7 you pay $20 per month on power.
The thought that a datacenter pays $20 to $30 per month on powering their systems for a client is ridiculous.

The number is in the thousands and thousands of dollars.

Also don't forget we're excluding other costs.
 
0
•••
mholt said:
The thought that a datacenter pays $20 to $30 per month on powering their systems for a client is ridiculous.

The number is in the thousands and thousands of dollars.

My power cost estimates were for a single dedicated server. I rent my servers for less than $200 per month each, so power costs are not "thousands and thousands of dollars".
 
0
•••
qbert220 said:
My power cost estimates were for a single dedicated server. I rent my servers for less than $200 per month each, so power costs are not "thousands and thousands of dollars".
Not for your server alone, but I was talking shared hosting, as I assume you were too, since you mentioned a figure like $5/mo. I'm not talking dedicated hosting... so that's irrelavent.
 
0
•••
Your original quote was:

mholt said:
Hosting under $1 is no more reliable than your home server. Probably less reliable, actually.

If you're gonna put a site online, do it right. Don't pay less than about $9/mo. for hosting.

I assumed that you were talking about shared hosting here. I took issue with this. I believe that you can get reliable shared hosting for less than $5 per month. I asked for data to backup your statement, but didn't get any.

Let's ignore electricity costs for the moment. A dedicated server can be rented for less than $200 per month. This server can host a few hundred sites (I host up to 300 sites on each server). Therefore the cost of the server for each site that is hosted is less than $1 per month. There are other costs (mainly support and admin costs) but my point is that a host can still provide a reliable service for less than $5 per month.
 
0
•••
I second RickM, hosting your sites on your own computers should be only done for testing, and NOT open to the rest of the world. There are a lot of security issues that we don't even need to think about when hosting on your own I.P.

But, if you must, go with XAMPP or WAMPP (friends of apache) as this path is likely to be the most secure out of the many options.



RickM said:
Lots of people here in the UK host their own sites as we all tend to have fast internet connections (most people on approx 2mbps, others on cable such as myself can get upto 20mbps). I would be very wary. Contact your ISP personally to make sure they allow it. I've seen many people loose their internet for breaking their ISP's TOS.
Also, security is a huge problem when hosting your own sites. Remember, datacenters have thousands of protection methods...many hardware based such as firewalls (not your standard ZoneAlarm stuff....I'm taking $5000+ hardware firewalls).
Just be very careful!
On another note, for Apache, PHP, MySQL and PHPMyAdmin I recommend:
WAMPP or XAMPP for Windows
and MAMP for fellow Mac OS X users
 
0
•••
qbert200 said:
I asked for data to backup your statement, but didn't get any.
Re-read my replies then let me know once you've found my post that depicted it.

Let's ignore electricity costs for the moment. A dedicated server can be rented for less than $200 per month. This server can host a few hundred sites (I host up to 300 sites on each server).
Being able to jam that many sites onto a server is not necessarily "reliable service"...
 
0
•••
mholt said:
Re-read my replies then let me know once you've found my post that depicted it.

The only thing I can find is:

Yep, you backed it yourself:

Originally Posted by qbert220
Your PC will be on 24/7. This will cost you more in electricity than buying hosting.

The electricity cost will be much less when using shared hosting than hosting your own since the cost is shared among the many sites on the same server.

mholt said:
Being able to jam that many sites onto a server is not necessarily "reliable service"...

It is not a matter of jamming as many sites as possible onto a server. I could host over 500 sites on a server, but it would be slower, and more prone to falling over.

I know that I can put 300 sites on a sever and still get greater than 99.99% availability. I know the cost of downtime to my business - I have to make payouts under my 99.99% uptime guarantee and it only takes a short downtime to loose customers. I spend a lot of time pre-emting potential server problems. I have a number of custom scripts to monitor my servers. This means I provide reliable hosting for well under $5 per month. I have done so for more than 6 years.
 
0
•••
mholt said:
Being able to jam that many sites onto a server is not necessarily "reliable service"...

We "Jam" up to 2000 sites on our servers. Each runs at under 50% CPU usage and are highly reliable (our longest running one has been online for 2 years, 1 month and 7 days).

Seriously, 10 years ago, no you couldn't have hosted that many sites on a server. With quality hardware, its not a problem that is even considered any more!

Obviously you can only host this many if you have the correct resources within the server (which we do).

My statement still stands. Why risk having a home server (and getting hacked, excess power, etc) when you can get a perfectly reliable hosting service for $1 (if you must be picky, even $5).

Seriously...home servers are great as a hobby (heck I do it myself) however when it comes to hosting, they are a no go....no questions about it, you cant rely on a home server....no matter how hard you try, you just wont do it.

Power : What happens when you have a power cut? A decent UPS = $x,xxx
Network: Your ISP goes down! Cost of a dedicated line: high (Not a US resident so I dont know exact figures)
Cooling: An aircon unit next to your desk....not good enough.
Security: No...your dog wont do. Neither will your locked front door.
Fire Suppression: um....no, just no.
Firewall: A router firewall or zonealarm just wont work.

Theres really no argument here...if you think running a home server for live sites is a good idea, then I suggest you take a trip to the doctors ;)
 
0
•••
hmm I use a domain if I host on my computer??
 
0
•••
eharvester said:
hmm I use a domain if I host on my computer??


u can use ur IP address instead :)
 
0
•••
Use a service such as dyndns.com to get a sub-domain of theirs pointing to your IP. Then just use either forwarding or managed DNS on your domain to allow it to be used.
 
0
•••
This is a very interesting and very informative post... How about security against DDOS? Is there any tutorial? Thanks
 
0
•••
A very good post, but security is a biggie. Since its a open shot straight to your computer, any experienced hacker can easily take over it. Good post, but please post any security tips & tutorials as security has become tight now :)
 
0
•••
gjvblack said:
...please post any security tips & tutorials...

Leave it to the experts! No - I'm serious. Let someone else take the risk. For a few dollars a month it is not worth it. This is especially true if you use a dynamic site (static HTML sites are much less vulnerable).

Still here? OK - I haven't convinced you. Setup a second PC to host your site. That way if anyone does break into it, they cannot get at your personal files on your main PC. If you use a NAT router, then open the port 80 connection to your second PC only. That way only port 80 is vulnerable. Block outgoing connections (either at the router or use a software firewall on the second PC). This would limit the damage an attacker could do (attackers frequently use a compromised machine for nefarious purposes, which would seriously upset your ISP). Keep any scripts you install up to date. Only use reputable scripts on your site.

Keep regular backups of your site on a second hard disk.

For a start I'd use linux (my choice - you could use windows instead) as the OS, apache 1.3 or 2.0 with mod_security and a good set of rules, PHP5, suhosin (hardening for PHP).

If you want to protect against DDOS (nowhere near as important as protecting your private data IMO), then install APF (software firewall), and DDOS deflate.
 
0
•••
Does anyone know if Comcast allows this?
 
0
•••
Shan said:
Does anyone know if Comcast allows this?

Get on their site and check their TOS / SLA :]
 
0
•••
when i was doing construction work i saw a guy in his townhouse basement have at least 20 servers running im not sure what he was doing but you never know your website might be hosted in someones basement lol
 
0
•••
zachary0611 said:
when i was doing construction work i saw a guy in his townhouse basement have at least 20 servers running im not sure what he was doing but you never know your website might be hosted in someones basement lol
If you're paying less than $9/mo, it's probably in a basement. Haha.
 
0
•••
RickM said:
Also, security is a huge problem when hosting your own sites. Remember, datacenters have thousands of protection methods...many hardware based such as firewalls (not your standard ZoneAlarm stuff....I'm taking $5000+ hardware firewalls).


I wouldn't even think of hosting my own site because of this one reason. :D
 
0
•••
Hosting on our own server means how serious we are in website business. Good info. Thankz.
 
0
•••
mdamin76 said:
Hosting on our own server means how serious we are in website business. Good info. Thankz.
Yuck. That is totally untrue.

I hope you were being sarcastic.
 
0
•••
oh thanks ,let me try it.and report you.
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back