
1. Get a domain.
- I'm using self www.godaddy.com. They are cheap, and have an OK system for keeping track of multiple domains. They also make it easy to change the DNS entries, which you need later.
- You simply purchase a free domain here, be the .net / .com / .org or whatever you want.

2. Get a server.
- This may be an old machine you have standing, it is amazing how crappy hardware you can run and still get a completely OK private server.
- I'll even debian sarge, and installing it is quick and completely painless. Can you install windows xp you can install debian. Just remember to include the file server / web server / database when you select the packages in the installation. You get the debian free www.debian.org. Just download and burn out. For guides to installing and such, it is just sticking on google for a walk, but because there is little need for it, everything is self explanatory if you just read what comes up during installation.
3. Get a DNS service provider.
- I'm using www.zoneedit.com, they let you drive 5 free zones, ie the 5 domains. They also provide support for dynamic DNS, which you need if you do not have fixed IP. Create an account here and add your domain. This is also fairly self-explanatory.
- When you arrive go to the Add Zones, here type your domain name foobar.com.
- Press the Start Editing Zone.
- Press the IP addresses, enter * in the first field (eg *. foobar.com) and your own IP in the other.
- Choose Yes.
- You should have been given two DNS servers, they are under the Name Servers on the domain. This is in the form of nsX.zoneedit.com.
- Enter the GoDaddy.com.
- Choose Domains | My Domain Names.
- Click on your domain, e.g foobar.com.
- At the bottom right you should see 'Name Servers Summary'
- Click on 'Click here to see details or modify two. "
- Select the Custom Name Servers and enter the two servers you were given from zoneedit.com here in their own fields.
- Select Save Changes.
4. Open the gates.
- Do you have a router you must open the ports in this. Exactly how this is done depends on the router, but the guides are everywhere, and if not just search on google and you are guaranteed an answer. Often goes under the name NAT, Virtual Server, or other less imaginative names.
- You must forwarde port 80 to the internal address of your server. Say that I have an internal network 192.168.0.x and my server is on 192.168.0.5. Then I forwarde all requests from outside on port 80 to 192.168.0.5. It is basically a simple change when you are in the router.
Now you will, within a short time, be able to enter your domain. I foobar.com, and you will be sent to your server. Does you installed Debian as described above, you will find a default Apache page.
Login to your server, either via ssh (eg putty works great for this) or locally, and configure samba and apache. How this is done, I could probably write here, but there are a bunch very good guides around. Mostly you need only change a few lines in the files / etc/apache2/apache2.conf and / etc / samba / smb.conf for both file sharing and Web server to work just fine.
Apache2 can also be exploited to run multiple domains on the same machine. If you eventually want to set up both www.foo.com and www.bar.com you can add something to allow this in apache2.conf.
CODE
NameVirtualHost *:80
ServerName foo.com
ServerAlias *.foo.com
DocumentRoot "/var/www/foo.com"
ServerName bar.com
ServerAlias *.bar.com
DocumentRoot "/var/www/bar.com"
Here is foo.com and bar.com and simply directories that you put under / var / www, apache will even check the URI string and sends the user to where he belongs.
Remember that you should share your webroot, usually / var / www, via samba. You can then log into the server through windows, create folders and control as you want here, and the results will be displayed directly on your domain. Items from smb.conf:
CODE
[wwwroot]
path=/var/www
valid users=linuxbrukerendin
read only=no
If you not have a permanent IP then you simply enter something in crontabben on the linux machine:
CODE
0 * * * * wget -O - --http-user=BRUKER --http-passwd=PASS 'http://dynamic.zoneedit.com/auth/dynamic.html?host=*.foobar.com'
This will update your DNSene with IPen you have right now every hour, so no matter how much IPen your changes will people be able to enter your domain name and now your server. Crontab, you can change by typing crontab-e.
If you follow this guide you will have a working web and file server, though not perfect. Furthermore, the configuration of the samba and apache2 is something one can take on the way.. I think even the most important thing is to just get things to work first, so one can then poke it and learn everything you need afterwords.