Set Up Your Very Own Web Server
Set Up Your Very Own Web Server
Table of Contents
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Author:CalcProgrammer1
I'm attending Missouri University of Science and Technology for Computer Engineering. I like working with electronics, and I'll post instructions on projects. I
also like the Nintendo Wii and the Xbox 360, but not the stupid PS3.
It's actually really simple to set up a Web server at home. I'm going to use this while I'm away at college to host game servers, have an offsite file backup, and share files
with friends. Since the PC hosting the server will be at my house and I will be in my dorm room, obviously I can't just walk over and start changing system settings, so
we'll need some kind of remote access.
Also, obviously, you'll need a dedicated PC, one you can leave running and leave connected at all times. What good is a server that goes down all the time? This PC
doesn't have to be great, but remember, the more you run on it, the faster the PC needs to be to not lag (duh).
Image Notes
1. EXCELLENT server! Prime location is away from bedrooms, so 24/7 operation won't disturb sleeping people. The only problem will be when we put that wall in,
which the cords are running through...
2. Wall goes here, but hopefully not for a while, because cords go through here too.
3. broken pc speakers :(
System specs:
This system performs very well as a server, so anything over this would perform even better. This PC cost about $100 to rebuild (already had RAM, case, optical drives,
and hard drive though) and that was late 2007 that I rebuilt it.
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Image Notes
1. NOT good server!
Image Notes
1. OLD! Not a good server, because it can't run Ubuntu at all (Pentium 133).
2. I still use this, failing hard drive, NOT good server.
3. My better desktop, would make a decent server, but decided to use my other
desktop instead.
4. Believe it or not, CAN host FTP...not very well, but still, it can!
5. Brand new gaming laptop is not a good choice for server!
Image Notes
1. EXCELLENT server! Prime location is away from bedrooms, so 24/7 operation
won't disturb sleeping people. The only problem will be when we put that wall in,
which the cords are running through...
2. Wall goes here, but hopefully not for a while, because cords go through here
too.
3. broken pc speakers :(
If you have a 64 bit PC, you'll want the 64 bit version of Linux. These are 64 bit chipsets:
-AMD Athlon64
-AMD Athlon64 X2
-AMD Turion64
-AMD Turion64 X2
-AMD Sempron64 (not officially marked Sempron64, but will have the AMD 64 logo on the packaging)
-Intel Core 2
-Intel Core 2 Duo
-Intel Core 2 Quad
If you have a 32 bit PC, you can't use the 64 bit edition, so get the 32 bit (x86) version. These are common 32 bit CPU's:
-AMD Athlon
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
-AMD AthlonXP
-AMD Sempron
-AMD Duron
-Intel Pentium 1/2/3/4/M/D
-Intel Celeron (some new ones may be 64 bit compatible though)
After you get the ISO image of whatever version you're going to use, burn the .iso file to a blank CD using your CD burning program of choice.
Now, if you want to dual boot (have both Windows and Linux on the same PC), go to System->Administration->Partition Editor. You can use this to resize your Windows
(FAT32 or NTFS) partition and leave some empty space to install Linux on. After resizing and applying, or if you're just going to install Linux on its own, double click the
"Install" icon on your Desktop. Follow through the guided setup, selecting "Use largest continuous free space" as the location to install to.
After it's done installing, reboot your PC. You should get GRUB (the bootloader, a black screen with a menu listing all the installed operating systems on your PC). Pick
Ubuntu from the list and hit Enter.
After it boots up, login using the name and password you entered during the install process. You should now see the Ubuntu Desktop. Now you're ready to serve!
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Step 4: Setup VNC
Well, now that you have your operating system installed, you'll want to enable some sort of remote access. With remote access, you'll be able to connect to your server
using another PC and see the server's screen. You'll also be able to use the mouse and keyboard on the remote PC to control the server's own mouse and keyboard,
meaning you can use the server from anywhere on the Internet.
Then type a password in the Password field. There's a character limit on it, so your password must be fairly short. This password will need to be entered on the remote
PC before you will see the server's Desktop.
FTP (File Transfer Protocol) is a system used to upload and download files to and from a server. Basically, it's like having a folder on the Internet, you can have multiple
folders that you copy files to. You can even use Windows Explorer to access your online folder and drag your files to it to upload them. Then you can give your friends an
account and they can upload and download too, eliminating the need to cram files into emails.
For this, I'm going to use Pro FTP Daemon (proftpd), a Linux program that runs a FTP server on your computer. I'm also going to use gproftpd, a graphical frontend (GUI)
that allows you to set up proftpd without having to edit text files or use terminal codes. I know this may sound confusing, but in reality it is very easy.
Start off by opening a terminal (Applications->Accessories->Terminal). There are other ways to install programs (if you absolutely can't stand terminal), but personally I
think it's faster just to use terminal if you know what you're looking for.
and hit ENTER. It will say "password:", enter your password (the one you setup during installation) and then press ENTER again. It won't put asterisks or dots as you type
your password, so don't worry if you don't see any indication that you've typed your password.
Then it will run through a bunch of stuff, possibly asking you to press Y or N (Yes or No) to the install, obviously press Y.
Then after it's done with that (will be back to the @ line), type:
and hit ENTER. It shouldn't ask you for your password this time since you've already entered it, but should it ask, just repeat the above.
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Step 6: Configure FTP Users
Now for the fun part. Go to System -> Administration -> GPROFTPD and enter your password if it asks for it. You should be faced with the GPROFTPD window. Your
server probably won't be activated, nor will it be set up, so we must go through and configure it first.
First, go to the Users tab. This is where you'll create an account for yourself. It's fairly self-explanatory, but here's the information you need to fill in:
Username: just put in whatever you want your username to be on your server. You'll use this to login. It can't have capital letters or non-standard characters, just
lowercase letters and numbers.
Password: self explanatory, again, lowercase letters and numbers. Note that it won't mask your password, so if you're entering a private password, don't let your friends
see your screen!
Group: Not too sure about this, just enter a group name. I'd put "administrators" because you're an admin, then for friends put "users" (unless they're really special and
you want to classify them as administrators too :P ) Again, lowercase letters and numbers only.
Comment: Put who the account really is ("me" works for yourself, or put your friends' real names here). Again, lowercase letters and numbers only.
Shell: just leave it as it is, /dev/null. I don't know what it's for, but it works fine if you leave it at that.
Check both "Require password" and "Show user in statistics" (if you want a hidden user, uncheck "Show user in statistics")
Maximum logins: Set how many simultaneous connections the user is allowed to open. For you, I'd set it higher, for other people, set it lower. Chances are, you'll be the
one uploading most of the files, so that's why you get more connections.
For the bottom part, put the user's home directory. For mine, I put /home/adam/ftp. Since I wanted to access my home directory from my account (/home/adam), I put
everyone else's account set to a subdirectory of my home (/home/adam/ftp). That way the FTP directory is within my user account's home, and my FTP account can
access the FTP home as well as my personal home directory. I recommend using /home// for YOUR home directory, with all permissions checked, and /home//ftp for your
friends (check permissions as you see fit). Permissions are self-explanatory, to allow a user to perform a certain action on a file or folder, check the box.
After you set up your user, click the "Add" button to add the user to the list. Repeat this step for as many users as you want.
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Step 7: Configure and Activate FTP Server!
Now is the fun part. You actually get to put your FTP server out there on your network, and it will eventually be on the Internet.
Go back to the first tab, the "Servers" tab. It is pretty much set up already, but here are some options you may want to change.
The servers IP-address or hostname: I'd recommend leaving this at 0.0.0.0, that means it will automatically detect its location and configure itself accordingly
Alternative server identity: You can use this to give your server a name. It's optional, and if you want to give it a name, change the box to "On"
Configure NAT routing: Set this to your router's IP, but it doesn't seem necessary, it works without turning it on, so no big deal, just leave it off and only use it if you have
problems
The administrators email address: You are the administrator, put your e-mail here.
Use identity/reverse lookups: No clue what these do, but Off/Off works fine
Time standard: Keep it at Local, chances are the people using your FTP know what time zone you live in.
Port: Leave this at 21, that's the standard FTP port. Should you desire to change it, and know what you're doing, go ahead, but if you don't know what this is, leave it at
21.
Passive port range: I don't know, leave at default and you should be fine
Maximum Connections: This is how many total (from all users) connections your server will allow. Default is fine here.
Maximum login tries: I guess this is for bad password tries. I prefer to set this higher, because I know people can mess up their password. Just because you mess up
your password doesn't mean you're a hacker, so I allow 40 tries on my server.
Upload speed: Set this higher than the maximum network speed connected to the server, it will ensure that your server doesn't slow down unnecessarily. If you're using
both LAN and Internet to transfer, set this over 1000, because LAN can transfer much faster and LAN transfers will be slowed down for no reason. Internet will simply not
reach the maximum speed, but that's obvious.
Download speed: Same as above, I set it high (1000) to prevent slow LAN transfers.
Automatically remove aborted uploads: I turn this ON. That way, if someone cancels an upload, you won't get half a file on your server (half a file is pretty useless and it
wastes space).
OK! Now you've configured. Click "Apply" to apply the settings changes. Now for the big one, click the "Activate" button and your server's status will change to
"Activated". That means you're now ONLINE! (well, not really, your server is up but only on your LAN, more on this later).
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Step 8: Install HTTP support, sit back and relax!
Thought FTP was a bit hard (or at least long?), no need to fear. Setting up HTTP support is downright simple.
and hit Enter, typing your password if necessary, and hitting Y if necessary.
(by the way, your web page's home directory is /var/www, you put your html files there)
Image Notes
1. Just that! That's all there is to it!
Image Notes
1. After installing and starting HTTP support with just one terminal command, sit
back and relax!
PROBLEM! Most video games are written for WINDOWS...but our server isn't running that :(
The answer? Wine. Wine is a program that lets you run Windows programs in Linux. 3d support isn't perfect, so the games themselves often have glitches or graphics
issues, but dedicated server programs for those games usually work flawlessly.
After Wine installs, you'll have a folder /home//.wine/drive_c/ (you have to click Show Hidden Files in the file browser to see .wine, because anything with a period in front
is considered hidden in Linux). This is the equivalent of your Windows C: drive. Any programs that you'd have in your C: drive go in this folder, as Wine sees this folder as
your virtual C: drive.
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
In my case,
You can make a launcher on your Desktop to start your server (assuming Source Dedicated Server here).
Type - Application
Name - Garry's Mod Server
Command - wine C:/gmodserver/orangebox/srcds.exe -game garrysmod
Comment - Start a Garry's Mod Server
Now you should get a nice icon on your Desktop, you can use this to run your server. Have fun gaming :)
Image Notes
1. drive_c is like Wine's C: drive. Put all your programs in here! Image Notes
2. programs 1. OMG! Windows program in Linux! OMGHAX!
3. not programs 2. Desktop Shortcut...ermm...Desktop Launcher (Shortcuts are for Windows)
4. Vista needs one of these!
5. feet
Port Forwarding is an option available in almost all home routers. Because your server PC is likely behind a router (your home network is a Local Area Network [LAN]
with a router connecting it to the Internet), your PC's IP address (the number that other PC's use to talk to the server PC) only works within your local network (all the
PC's connected to your router). In order for the outside world (Internet) to talk directly to your server, your router needs to let the two communicate. Normally, the outside
world (Internet) would talk to your router, and your router would relay that message to your PC. This works great for browsing, but not for serving.
To open this communication channel, we need to look at ports. Ports are "channels" that different programs use to talk on. Some common ports:
21 - FTP
80 - HTTP
5900 - VNC
29070 - Jedi Academy (used to host a JKA server)
There's tons more (like 65 thousand of them lol) but that's not the point. The point is, you need the port on your Internet IP address to be connected directly to the port on
your server's local IP address.
To do this, open your router's settings page (you'll need to know the admin username and password for it). The router's page is usually at http://192.168.1.1 , though
some can be at http://192.168.0.1 , http://192.168.2.1 , or other addresses. If you can't connect, consult your router's instruction manual or Google search it.
Once in, you need to find Port Forwarding. My Netgear has it right on the side column, not sure about other brands. From here you can go to work. You'll need to know
the local IP of the server PC (you can find this by right clicking on the networking icon at the top-right corner of the screen, the icon with two PC's, and selecting
Connection Information, it's the "IP Address" field).
(format: "name" - TCP/UDP - start port - end port - 192.168.x.x (replace with that of your server))
"VNC" - TCP - 5800 - 5900 - 192.168.x.x
"FTP" - TCP/UDP - 21 - 21 - 192.168.x.x
"HTTP" - TCP - 80 - 80 - 192.168.x.x
"Gmod" - TCP/UDP - 27015 - 27015 - 192.168.x.x (replace with the settings for your game obviously)
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Step 11: Get a free domain!
Ok, so you have a server. Do you really think all your friends are going to be so eager to sign on to http://75.185.355.1337 (obviously not a real IP, but most of your
friends won't know that) to get the latest? NO! Remembering your long, boring, ever-changing IP is hard even for those who understand it. This is the Internet, yet you're
telling them something resembling a long phone number.
You need a domain! A domain name is a mask for your IP address. Just like any other site, Google's servers have an IP address. However, you don't know their IP
address, all you know is www.google.com. So, how come you can connect to them without knowing their IP? Because, the domain www.google.com links to Google's
server's IP address and sends requests to it.
The problem with domain names is that they cost money to register. However, if you're willing to sacrifice, you can get free domains at www.no-ip.com. The downside is
that your domain will be <yoursite>.servegame.com or something similar. They have a bunch of domains you can choose to be at (servegame, servehttp, serveftp just to
name a few) but you can't get your completely customized domain. (For example, I can get [and have already gotten] http://calc.servegame.com , but not
http://calcprogrammer1.com [which would cost money to register])
Other than the name thing, no-ip domains are great. Free ones only last 60 days, but when it's about to expire they send you an e-mail that you can extend your use of
the domain for free.
You'll need to know your Internet IP address, which can be found simply by googling "What is my IP" (you'll get a ton of sites that will tell you your IP). Use your Internet
IP in your no-ip setup.
Image Notes
1. Your INTERNET (not Local) IP address goes here
2. leave this
3. Your site name
Image Notes
1. Choose one of these, pick the one that best fits your server.
2. Don't bother with the Mail Options, you're just doing a hostname.
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Step 12: Test it out!
Now comes the fun part. Everything should be set up and ready to go, all you have to do is test.
Start out by testing http, since that's the easiest. Simply open your browser and type "http://<your no-ip domain>.com" and hit Enter. With any luck, "It Works!" should
appear (the test message from apache2, you can change the file in /var/www after you know it does indeed work). If it doesn't, try "http://<your Internet IP> [no www. or
.com, just the IP number]". This SHOULD work, if it doesn't, your port forwarding isn't working. If neither of those work, as a last resort, try http://<your LOCAL IP> (again,
no www. or .com, just number). This SHOULD work, if THIS doesn't work, it means your server isn't working.
Then test FTP. Open up Windows Explorer and type "ftp://<your no-ip domain>.com". You should be prompted for username and password, type your FTP username
and password and you should see all your folders. Try uploading a file. It should work, if it doesn't accept the file, go play around with GPROFTPD's user page. Again, if it
doesn't work, try the above URL's except with ftp://
Next, test VNC. You'll need a VNC viewer. TightVNC and UltraVNC both are great VNC Viewers for Windows. For the VNC address, simply put your no-ip domain and
.com (for example, calc.servegame.com, no http://, no www., and no ftp://). You should be prompted for password. Put whatever password you entered for VNC. If all
goes well, you'll see your server's screen on your Windows PC's screen.
Last, test games. If you're hosting a game server, log on and see if you can join.
If all goes well, you now have a server! Now go learn how to make a web page, upload some files to share, and go play some games! Having your own server can be a
great help in college or anywhere else they limit Internet connections (namely P2P) because you can run P2P applications on your server at home and then download the
finished downloads via FTP or HTTP. Have fun!
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Related Instructables
Turn an old
Computer into a
Setting up an Give Your Cat Worldwide How to Start a
FTP server web server! by Twitter Powers microcontroller Home
using filezilla! z2daj by bpunkt link for under Website/Server MAYA Budget
by kbarn021 $20 by Dr_Acula by bdk184 Telepresence
Rover by bhylak
Comments
50 comments Add Comment view all 198 comments
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
Dms12444 says: Jan 29, 2010. 7:30 PM REPLY
Pardon my asking, but in Windows couldn't you just use IIS (internet information services), It's free (I think), and runs on Windows.
If you're using Windows to host a server, I also recommend the (Windows only) FileZilla Server, it is a solid FTP server that is probably the best
FTP server I've used on any OS. However, Windows isn't free and Linux is a stable server platform, but I switched my server to XP because of other
things I needed to run on it.
http://www.instructables.com/id/Quicky-web-server-for-MSWindows-XP/
http://www.instructables.com/id/Home-Automation-MSWindows-XP/
There is also xampp for windows.
I am running Ubuntu 10.04 Lts. In the VNC, there is no option to make it public. how do I make screen sharing public?
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
harry599 says: Aug 24, 2010. 2:50 PM REPLY
wheres that??
thank u in advance:-)
- Can't get any options for uploading or downloading when I got to the FTP site--do I use a program like FileZilla to upload/download files? Is this supposed
to be entered in a browser? Ex: ftp://mysite.serverburger.net ? Or used primarily with one of those FTP programs?
- When I try to edit index.html, it says its a read only file. What do I do?
I'm a totally noob with Ubuntu and servers, so pardon the silly questions.
http://www.instructables.com/id/Set-up-your-very-own-Web-server/
compsfreak17 says: Feb 19, 2010. 7:31 PM REPLY
for some reason the ftp server will not activate. i click the activate button and the status still says deactivated. anybody know a solution?
http://www.instructables.com/id/Set-up-your-very-own-Web-server/