PDA

View Full Version : How do you host your own website?


The Central Scrutinizer
3rd December 2003, 06:07 PM
I know you need a high speed connection with a static IP address.

What I want to do is learn more about web design, web hosting, Java, PHP, etc... I'm thinking of spending $799 on an eMac to host the site, since Panther is built on top of UNIX. I know I need Apache to host the site, but what else? Anyone else doing this now?

Thanks!

DangerousBeliefs
3rd December 2003, 06:29 PM
Uh.... why host your own site? It's much more economical to virtually host.

Zep
3rd December 2003, 06:37 PM
You don't just need Apache, it just happens to be the most-used webserver software. It's certainly good, but, like Windows, it trades more on its prevalence really than its absolute suitability. There are other webserver products...shop around.

Think security #1. Home-grown servers are prime targets for the nasty people using them as drones to send bulk spam, etc. The average time for unprotected servers to be found now is measured in minutes. Look at firewalls and routers, etc. Again, ask around, shop around, do your homework.

What is your target audience? What services do you intend to offer? Ergo, what are your expected data holdings and hit rates, and will these change? Configure your equipment accordingly.

"Commercial"-like sites also have to consider reliability. What's your uptime intentions? Are you happy to live with outages of hours to days while you tinker/fix? Or do you think a few minutes down per week is "real bad"? Plan and configure things accordingly!

And that's just the server!

Skeptoid
3rd December 2003, 06:51 PM
Check this out. http://www.1and1.com 3 years free web hosting, 500 MB storage, 5 GB transfer/month, 50 mailboxes, 500 forwarding addresses, a simple WYSIWYG web page designer. Domain registration for $5.95/year. And more. I signed up and there seem to be no catches. Now I just need to motivate myself to put a website up. :p

The Central Scrutinizer
3rd December 2003, 08:20 PM
Originally posted by DangerousBeliefs
Uh.... why host your own site? It's much more economical to virtually host.

The economical part isn't an issue. I really think it would be a great chance to learn all the technologies involved.

CurtC
3rd December 2003, 09:31 PM
Clearly, what The Central Scrutinizer needs is to meet a nice girl.

The Central Scrutinizer
3rd December 2003, 10:29 PM
Originally posted by CurtC
Clearly, what The Central Scrutinizer needs is to meet a nice girl.

I figure that if I host my own website, I'll have hot chicks crawling all over me!

xouper
3rd December 2003, 10:56 PM
Skeptoid: Now I just need to motivate myself to put a website up. :p Motivation? What's that?

So far, I only have a few pages I would consider completed, and lots more that aren't. Here's a sample of both:

http://www.xoup.net/peeves/

http://www.xoup.net/faq/watermolecules.php

peptoabysmal
3rd December 2003, 11:08 PM
I have a feeling this should have been posted in the Computers section.

If you are going to create a site that stores data or uses data to generate content, you will need to have your own server. Otherwise, it is a lot more economical to just use a hosting service.

Don't use a Windows / NT server unless you want to spend all of your time keeping hackers out and repairing the damage they do. (Although some of the things you can do for a strictly Windows IE world are pretty awesome on NT servers).

Here's a server for $224 (base price with rebates) that will probably serve your needs better than the eMac at Dell (http://www1.us.dell.com/content/products/productdetails.aspx/pedge_400sc?c=us&cs=04&l=en&s=bsd).

Get it with Red Hat Linux, load it with Apache, Java, Tomcat and PostGreSQL or MySQL (all free) and you are ready to rock and roll. :)

UnrepentantSinner
3rd December 2003, 11:08 PM
Shouldn't this thread be in the Computers and Internet section?

Wudang
4th December 2003, 01:45 AM
Maybe you should team up with a_unique_person who is now the owner of a rather nice box (http://host.randi.org/vbulletin/showthread.php?s=&threadid=31660)

jimlintott
4th December 2003, 08:35 AM
Here's a server for $224 (base price with rebates) that will probably serve your needs better than the eMac at Dell.

Get it with Red Hat Linux, load it with Apache, Java, Tomcat and PostGreSQL or MySQL (all free) and you are ready to rock and roll.

I would second this. You could run an old pentium 200 with 64 megs of ram to do this.

There is one thing being overlooked here and that is DNS services. You'll either have to have somebody provide this or do it yourself. If you do it yourself you should note that you are supposed to provide IP addresses for both primary and secondary DNS servers. Basically you are supposed to have two IP addresses and two servers. In practice this is a bit silly, if your server goes down, who cares about secondary servers.

Of all the aspects of setting up a server, DNS is probably one of the most confusing. I think that you might be able to find free DNS servers available. Try google.

You might as well run your own mail server too. Remember that the more services you expose to the net the more security problems you may have. Mail and DNS may have more exploits than http. You probably should avoid sendmail and bind. Postfix can replace sendmail and there are alternatives to bind.

If you can set up zone files for bind you will at least have afeeling of great accomplishment.:D

CurtC
5th December 2003, 06:49 AM
peptoabysmal wrote:
If you are going to create a site that stores data or uses data to generate content, you will need to have your own server. Otherwise, it is a lot more economical to just use a hosting service.My hosting service, which costs like $10 per month, allows CGI, as do most I believe. I have CGI programs running on mine to store data and generate content. Much much easier than getting my own server.

bjornart
5th December 2003, 06:54 AM
I'm going to set up my own server in the not too distant future too. I can't get a fixed IP address, so I'll have to go for a dynamic DNS solution of some sort.

I probably won't try out lots of technologies, and I could probably do anything I will be doing on a hosted service, but I want to have a box at home that I can point to and say: "Oh, that's my server." Plus I'm going to use it as an SMTP server as well so I can have any number of silly emails on my domain. :D

CurtC
5th December 2003, 12:08 PM
For your own server, this one (http://www-ccs.cs.umass.edu/~shri/iPic.html) wouldn't take up too much room.

The Central Scrutinizer
19th December 2003, 03:40 PM
Originally posted by Zep
You don't just need Apache, it just happens to be the most-used webserver software. It's certainly good, but, like Windows, it trades more on its prevalence really than its absolute suitability. There are other webserver products...shop around.

Think security #1. Home-grown servers are prime targets for the nasty people using them as drones to send bulk spam, etc. The average time for unprotected servers to be found now is measured in minutes. Look at firewalls and routers, etc. Again, ask around, shop around, do your homework.

What is your target audience? What services do you intend to offer? Ergo, what are your expected data holdings and hit rates, and will these change? Configure your equipment accordingly.

"Commercial"-like sites also have to consider reliability. What's your uptime intentions? Are you happy to live with outages of hours to days while you tinker/fix? Or do you think a few minutes down per week is "real bad"? Plan and configure things accordingly!

And that's just the server!

All valid questions, but for my purposes, mostly irrelevent.

Here's what I want to do:

I have an XP laptop connected to a high speed connection (but not a static IP at this point). I'm considering investing $800 in an eMac to also connect to this same broadband connection, AND also host a website. This is all purely for my own education. Realistically, the website itself is meaningless, and I don't care if anyone ever hits it. I'll be the only one who will care anything about it. I want to learn how to configure Apache, and sendmail, etc. I want to learn all about the security and firewalls, etc. Again, this is all for my education - I know its faster and cheaper to have someone host it, but then I don't learn anything.

So, having said all that, what do I need hardware wise? What is the difference between a router/hub/switch/etc..? Which do I need? I understand (I think!) the concept of 2 machines sharing 1 broadband connection, but when someone requests my webpage, how does that router/switch/hub know which machine to send it to - the eMac server (correct) or my XP laptop (incorrect)?

Can anyone suggest a book or anything to get me started?

The Central Scrutinizer
20th December 2003, 12:44 PM
Anyone??? Pretty please with sugar on top?

Wudang
20th December 2003, 12:59 PM
Okay - there is a ton of free material available at different places. If you want to now how it all works go to http://www.redbooks.ibm.com and download the TCP/IP Tutorial and Technical Overview. Scream.
Seriously, keep it by you as a reference. Now, on your XP box pulll up a command prompt and type
IPCONFIG /ALL
and look at what it tells you. Go to the control panel. Look at the internet options especially the advanced tab.
Buy an ethernet hub for a few bucks (I got one for £20 including 2 cables and 2 cards) and hook your machines together.
Sendmail is a whole subject by itself - in fact ORA do a whole book just on sendmail.
A router and a hub are both ways of connecting. A router is usually something that understands the packets that are passing through, to some degree, and can act upon them - eg I won't let this through, this shoukd go over there etc. A hub is usually just a piece of dumb hardware.
I'll take a breather now. I've probably made so many generalizations that I'll have other techies howling for weeks.

NightG1
25th December 2003, 02:53 PM
Originally posted by The Central Scrutinizer
Anyone??? Pretty please with sugar on top?

CS:

I have been running a rather pointless site off my wife's iMac for about a year. It would be better for me to tell you how to do this once you buy the eMac. If you do get the eMac and do not sustain a hernia getting the damn thing in your house, PM me and I'll go over the 4-5 steps you will need to get Panther serving HTML. Also, there are some websites that offer OSX software that monitors your IP and redirects any updates or changes to a real URL. Prices range from free to 30-50 bucks. Check out No-IP.com (http://www.no-ip.com) and see if this will be of benefit.

NightG1
25th December 2003, 04:37 PM
Originally posted by The Central Scrutinizer
So, having said all that, what do I need hardware wise? What is the difference between a router/hub/switch/etc..? Which do I need? I understand (I think!) the concept of 2 machines sharing 1 broadband connection, but when someone requests my webpage, how does that router/switch/hub know which machine to send it to - the eMac server (correct) or my XP laptop (incorrect)?

Can anyone suggest a book or anything to get me started?

I could tell you what I think the difference between a router and a hub is but I would get laughed off the forum by the more technically versed and my explanation would be a wild-assed guess. A hub is just a bank of RJ45 ports where you can connect several ethernet lines and have them talk to each other. A Router is not a hub but is a thing you will need to connect your high speed gateway (cable or DSL modem) to the network you are setting up. You will probably need router and a hub if you want to connect both your XP laptop and eMac to the same network or get something like a Hawking H-WR258 which is a WAP, router and 4 port hub. Make sure the software you need to configure the router is OSX compatible otherwise you will also have to learn some UNIX to configure the thing. As for which computer is identified as the HTML server, this is Apple's approach:

http://pages.sbcglobal.net/nightg1/ppoeset.jpg

You map port 80 to a static IP (the eMac) on your network and these settings are stored on a EPROM in the router. All you need to do is assign a static IP to the eMac that is above XXX. XXX.XXX.200 and you are ready to build the web site. The default Apache configuration points to the "sites" folder under your username home directory with index.html as the default first page.

ShowMe
26th December 2003, 06:47 AM
Originally posted by NightG1
I could tell you what I think the difference between a router and a hub is but I would get laughed off the forum by the more technically versed and my explanation would be a wild-assed guess.


By and large the more technically versed don't laugh at folks on this board. We will occasionally correct or ewnahnce something that someone has said.

And you were absolutely correct on the hub aspect; it's simply a way to put several machines together. It blasts the packets over every port expecting to eventually get the right one.

Other simplified examples:

A switch is a fancy hub, but instead of blasting packets everywhere it remembers where all the machines are located on the network. So instead of blasting every port, it only sends the information to a single port.


A route...well, a router routes. It's used to go between a number of different networks. It discovers the best route and sends packets on their way. The "best routes" are stored as "routing tables" in memory.

Segnosaur
28th December 2003, 11:59 PM
Originally posted by The Central Scrutinizer
I know you need a high speed connection with a static IP address.



Just a little side note... you may not actually need a static IP address. There are some companies that offer dynamic DNS services. (the draw back is that they may be limited in the possible domain names they can offer.)

hlehmann
29th December 2003, 02:52 PM
Creating my own web site was done for two reasons: as a learning exercise to get familiar with Linux,apache,ip routing,mail servers, PHP, mySQL, etc., and to give me a way to post snapshots of family events, little league games, etc to show to relatives scattered across the country.
I have RoadRunner cable internet access. While technically a dynamic IP, I have found that as long as the cable modem stays powered up the IP number never changes. The last time it changed was over a year ago when I had to disconnect everything for a couple of days while installing new flooring in our family room.
I use ZoneEdit.com as my DNS. They give free DNS for up to five domains.
My web server is a 1.5GHz Shuttle mini-box, running RedHat Linux 9. apache, web server, Postfix mail server, mySQL, and an awsome open-source package called Gallery that posts pictures.
My cable internet only provides 384kbps upload speed, but for the little traffic I get that's enough (There have been days when I haven't received a single hit.)
If you really want to go this route, be prepared to spend a lot of hours installing, fiddling & debugging; but you'll also learn a lot. You also need to take the responsibility of making sure your server stays secure and up to date. That means checking log files every day, installing firewalls, and knowing how to find out what your server's really doing at any given time.