Starting an Internet Server - a beginner's guide

1 Conversation

I began running a web server just about 3 weeks ago and when I started I had little-to-no knowledge about what to do. It's successfully running and I've had nearly 500 visits to date (including visits from connections across the pond in Europe), but it wasn't easy to get going. Most of the instructions online assume a lot of knowledge and the books aren't much easier to read. Help can be found in IRC rooms, but sometimes the people there are a little less than helpful. Therefore, I decided to write this guide.

Starting Up:
Here's what you'll need in order to follow my guide:
A computer with an internet connection
A router (if you want to connect more than one computer at once)
Ethernet Cables
Linux

I'm going to assume that you at least know how to connect your computer to the internet and have linux installed.

Ok, let's get started:
1. If you have a router you'll need to configure it to know that one of your computers is a webserver. This differs dependong upon your router, but basically you want to tell it to send http requests to the IP address of the computer that will be the server. There are many, many brands and versions of browsers so I won't go into specifics.
2. In the linux machine you need to have Apache installed, if you did either a server install or a full install it should be there. If not, you can obtain it from http://www.apache.org.
3. Open up a terminal window. In Fedora this is done with ctrl-T
4. Go into super-user mode by typing su - and then inputting the root password.
From this point onwards I will assume folder locations from a Fedora install. Modify the folder location according to your distrobution.
5. type cd /etc/httpd/conf/ to get to your configuration file.
6. type vi httpd.conf to edit it
7. Most of this stuff can remain the same. Go to line 246 and put your email address
8. Go to line 260 and put the IP address of the linux machine
9. Go to line 276 and type in whatever folder on your computer you want to be open to the world. I left it with the default, but you could make it any folder you want as long as the folder has "anyone can read it permissions".
10. That's pretty much all you need to change in order to have a working server. Don't change anything else unless you feel comfortable that you know what the change will do. Type :write and the :q to quit.
11. Still in the terminal window type service httpd start. (This is a fedora command, I don't know if other linux distrobutions have it)

That's it, you now have a web server running. Of course, it may not work on the first try. The largest source of problems is in getting the router to get the http packets to the right computer. In order to see where the problem is you can take the following steps:
1. Try to type in your Linux machine's IP address in the web broswer of another computer on the same browser. If this works then the server was set up correctly. If this didn't work, then it wasn't set up correctly.
2. For people in the outside world to see your page they will type in the IP address given to your cable modem by your ISP NOT the IP address of your machine given to it by the router. That took me a while to figure out.

One thing - if your ISP changes your IP address then you have to have people use the new IP address on your machine. With the particular ISP I use in the USA, as long as the modem doesn't lose power I keep the same IP address.

Finally, if you want a pretty name for your website like http://server.ericsbinaryworld.com for example, you have to get a doman name with a domain name service and set it to link to the IP address assigned to your modem by your ISP.

You are no longer a slave to other hosting services and are limited in storage space only by the limits of your computer. Your content can be whatever you want! Wahoo!

Happy Hosting!

Bookmark on your Personal Space


Entry

A2631278

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

References

External Links

Not Panicking Ltd is not responsible for the content of external internet sites

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more