So you want to set up a web server? Why would you want to do that, you say? It’s great for a number of reasons:
- hosting your own website, bulletin board, or blog
- giving people read-only downloads (can be password protected!) to files
- testing new versions of existing websites before they go live, without requiring an Internet connection, which even includes developing Facebook applications
- run your own instance of WordPress
- a great way to familiarize yourself with developing and deploying web applications
I’ll be guiding you to installing a server configured for the PHP Hypertext Processor (PHP). At the end, we can set up a MySQL database to store persistent data. Note that in this tutorial, there will be no direct linkage to this service – it’s up to your application to do this.
For most users, you should be following this basic server setup:
Step 1. Choosing a HTTP Server
Many will argue that a robust, enterprise-level server like Apache
is required, but for most home usage purposes, which expect a relatively group of visitors on average hardware, I personally choose Aprelium’s Abyss X1 Server
. Versions are available for Windows, Mac and Linux. It is very user friendly – done completely through your web browser, compared to Apache, which requires text-editor modification of xml configuration files.
Install Abyss X1. You may also need to register for a free license key.
Follow the instructions available here to complete the setup.
Step 2. Installing PHP (optional)
PHP is a language designed to integrate well into existing HTML code, allowing dynamic page content. If you don’t need a PHP renderer, you may skip this step. Otherwise, if you’re Windows, follow this instruction
, and for everyone else, follow this instruction
Step 3. Installing MySQL Database (optional)
MySQL is a database, which is useful for keeping data around for longer than the browser session – comments, posts, and accounts can all be stored inside. There are other alternatives, such as Oracle XE and PostgreSQL, but my personal choice is MySQL for its simplicity to use.
You can now connect, using http://localhost
(unless you changed the HTTP host’s port during setup, default is 80) or your computer’s local IP address. You will probably have to configure the HTTP documents folder to point to the right directory. And so that concludes this tutorial – writing the actual code to link PHP and MySQL, and setting up the MySQL databases will be for another day. We’ll also look in a future post at how to access this web server from anywhere in the world.
In the meantime, here’s some other web server-driven software you may want to consider trying:
- Joomla – Content Management System for fast configuration and deployment of many types of sites
- phpBB – PHP bulletin board system
- phpMyAdmin – manage MySQL databases from your browser
- WordPress – a blogging tool; currently powering this page!
And here’s some other servers you might want to run:
- Apache Tomcat – supports Java Enterprise (J2EE) deployment
- FileZilla FTP Server – file transfer over the regular file transfer protocol (Windows only)
- OpenSSH – secure protocol allowing remote terminal, X windows, SFTP
- OpenVPN – keep your traffic secure when connecting from a public wireless location
- SqueezeCenter – create your own personal Internet radio station while listening and viewing your library from anywhere
Stay tuned! – I’ll be showing you how later to connect to your home, so that you or your visitors can visit your server without memorizing any numbers!