# Sticky  Trying to setup a webserver? Read this first



## DumberDrummer

Ok, so you want to run a webserver on your personal computer or even on a dedicated one in your closet? This will help with some basic questions and troubleshooting. 

*What is a webserver?*
A webserver, or just server, is a computer that stores various files for retrival over the internet. All websites that you visit, such as this one, are run off of servers. Basically, your browser (Internet Explorer or Firefox) sends a request to the server and the server responds with the requested data. 

In order to use your own computer as a server that others can visit, you must first have a server installed and running on it. This FAQ will explain the basics behind running a webserver and some common problems. 

*Suggested Server Software*
The reccomended software to run is the server known as "Apache". It is downloadable from the main apache page (found here) in binary form (or source if you are so inclined) for Linux and Windows distributions. Installation can be difficult, so you can ask for help here or search the documentation for help. 

*My webserver is setup, but nobody other than me can see it!*
Make sure that:

*-*Your firewall allows apache to be accessed by the web

Check your firewall's settings. Usually, on the first time Apache is accessed, the firewall will popup a window asking if Apache should be allowed access. Hit yes. 

*-*Your firewall isn't blocking port 80

This depends on the firewall, so check your documentation. 

*-*If you are using a router, that port forwarding is enabled for port 80 to the computer that is hosting

Again, this depends on your router. Most routers have similar configurations, but there is a site known as portforward.com that lists many major router brands and will provide step by step instructions for enabling port forwarding on your router. (For a webserver, the port will be *80*)

*-*You don't have an ip that changes often, as this will muck up most webservers. 

You can use services such as DirectUpdate and DynDNS to get a free subdomain and keep your ip address constantly linked to the subdomain to simulate a static IP.

*Extras:*

*PHP*

*What is it?*
PHP, or PHP: Hypertext Preprocessor is a server-side scripting language. What this means is that the code is executed on the server hosting the file and then the output (usually HTML) is sent to the browser requesting the information. This is useful because it allows for easily modifiable and dynamic content. In tandem with a database such as MySQL, it allows for huge user driven sites such as forums and blogs. One prime example of this is this Tech Support Site, which uses several PHP scripts storing and retrieving posts and user data from a MySQL database. 

*Installation*
First, PHP must be downloaded. It is available as source to be compiled in linux, or as a windows binary here. (Note that many linux distros come with PHP already installed so it may not be necessary to install it.)

PHP installation documentation can be found at the main PHP site for *nix Systems and Windows Systems. Any installation problems are welcome to be posted in this forum. 

*Ok, its installed. Now what?*
You can write your own scripts, use other's scripts, basically anything PHP related. 

To learn PHP, the World Wide Web Consortium has a school that can cover the basics for you, and can serve as an excellent reference. The PHP portion of the W3 schools can be found here. 

You can find ready made scripts that will setup forums, blogs, and other scripts that might be difficult to write on your own at many different sites, such as HotScripts and The Resource Index 

A couple of things to note about premade scripts are that not all of them are free, and many require other software running on the server, most often a database of some sort. This leads into the next section, which is:


*MySQL*

*What is it?*
MySQL is a free database server program, that allows you to store data in binary and ASCII format in an organized and categorical format. Think of it as a gigantic spreadsheet that can hold all kinds of data. For example, when you type your username and password in to login to this site, it looks up your username in the database and compares the password you entered to the one that is already in the database. 

*Installation*
MySql is downloadable for various systems, including many different distrobutions of linux and windows here

Documentation on installation for Windows and Linux is available at the main MySQL site. Again, feel free to ask any questions in this forum, and we'll be glad to help you. 

I have no MySQL resources at this time, but many times it comes in handy if you want to install ready made PHP scripts such as PhpBB. Most PHP tutorials also explain MySQL at least in passing, and it is doubtful that you will be using a database without some form of scripting language. 

*FTP*

*What is it?*
FTP stands for File Transfer Protocol, the old school method for transferring files over the internet. It still has its place in today's world mainly as a way to transfer lots and lots of files or larger files to another location. Most webhosts will provide FTP access to your server so you can upload files. You may want to add an FTP daemon to your server if you are considering selling space on the server, or if you want to give your friends a place to put their files. 

*Which FTP Daemon?*

For Windows, FileZilla serves as an excellent FTPd. (Direct download link here)

More later





Ok, this is what I've got so far. No doubt, I'll add on to it, and try to make it as all encompassing as possible. (Hopefully coming soon, a section on an FTP Server.)


----------

