Welcome to slayer’s blog | Web Design tips & tutorials
HomeAbout MeContact Me

This tutorial will teach you how to setup and manage a local webserver on your PC using XAMPP that you can use for testing scripts, programming,etc.

Having a webserver on your PC can greatly help you, since you can test out stuff on your local PC -> you don’t need to wait till files are uploaded to a webhost, if you make changes to files you don’t need to reupload them, and you have full access to php.ini file (where you can set php variables - SAFE MODE, REGISTER GLOBALS, etc) this meaning that you have no restrictions and you have full flexibility.

Ofcourse you can setup a webserver using the tougher way by downloading Apache, PHP , Perl , MYSQL , phpMyAdmin and setting up the server manually, defining the php variables and connecting phpMyAdmin with MYSQL

There are lots of packs that contain Apache,php,mysql,phpmyadmin:

Wampserver - http://www.wampserver.com/en/

XAMPP - http://www.apachefriends.org/en/xampp.html

PHP Triad - http://sourceforge.net/projects/phptriad/

EasyPHP - http://www.easyphp.org/

FoxServ - http://sourceforge.net/projects/foxserv/

OmniHTTPD - http://www2.stack.ru/~julia/PHP4/install.omnihttpd.html

You can choose any one of the ones written above, in this tutorial i will teach you how to install, setup and mantain a server that was created using XAMPP.

First of all lets check out all the features that XAMPP has:

  • Apache HTTPD 2.2.6 + Openssl 0.9.8g

- The Apache HTTP Server, commonly referred to simply as Apache, is a web server notable for playing a key role in the initial growth of the World Wide Web.

- OpenSSL is an open source implementation of the SSL and TLS protocols.

  • MySQL 5.0.51

- MySQL is a multithreaded, multi-user SQL database management system The basic program runs as a server providing multi-user access to a number of databases

  • PHP 5.2.5
  • PHP 4.4.7

- You can switch between the 2 versions of PHP, also note that suppoert for php 4.4.7 has been discontinued starting from 31st december 2007.

- PHP is a computer programming language originally designed for producing dynamic web pages.

- PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications.

  • phpMyAdmin 2.11.3

- phpMyAdmin is an open source tool written in PHP intended to handle the administration of MySQL over the Internet. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, and manage keys on fields.

  • FileZilla FTP Server 0.9.24

- FileZilla Client is a free, open source, cross-platform FTP client. It supports FTP, SFTP, and FTPS (FTP over SSL/TLS). As of August 10, 2007, it was the 12th most popular download of all time from SourceForge.net

  • Mercury Mail Transport System 4.52

- Mercury Mail Transport System (Mercury MTS) is a standards compliant donationware (was freeware prior to 2007-01) email server developed by David Harris, who also developed the Pegasus Mail client.

Lets begin with downloading XAMPP:

- Head over to http://www.apachefriends.org/en/xampp-windows.html and download the XAMPP installer

Just save the installer where ever you want(save it in a place where you will surely find it)

The installer is relatively small, it has 37MB, and it is hosted on sourceforge, this meaning that the transfer will be fast( i downloaded it with 230kb/s) so if you have a good internet connection you will have the installer in a matter for 1-2 minutes.

After download run the installer, here are the steps you need to follow:

1) Select the location where you want XAMPP to be installed(space used after installation is 200MB):

2) Select which services you want XAMPP to install( uncheck Filezilla, because you won’t use it) and hit “Install” button:

3) Sit back and wait till the installer does its job:

XAMPP will also configure PHP

4) Head over to the XAMPP Control Panel and check if everything is OK:

In case the status of Apache or MYSQL is STOPPED than press the start button and the service will start. Simple as pie :).

You can check out the status of the services by pressing the “Status” button:

You can access your local webserver by typing http://localhost/ in your browser’s address bar or http://127.0.0.1

IF everything is working fine after selecting the language you will find a page that will say:

Welcome to XAMPP for Windows Version 1.6.5 !

Congratulations:
You have successfully installed XAMPP on this system!

Now you can start using Apache and Co. You should first try »Status« on the left navigation to make sure everything works fine.

For OpenSSL support please use the test certificate with https://127.0.0.1 or https://localhost

For this release a special thanks to Uwe Steinmann for his excellent development and compilation of all current “Special” modules!

Good luck, Kay Vogelgesang + Kai ‘Oswald’ Seidler

Other stuff that you should know:

You can access phpMyAdmin at http://localhost/phpmyadmin/

You can test out your scripts by copying them to C:\xampp\htdocs

Your database server is: localhost

Your database user is: root

By default you don’t have a root password, to set a password open up C:\xampp\phpmyadmin\config.inc.php

Edit the line: MySQL user $cfg['Servers'][$i]['password'] = ”

After editing it should look like: MySQL user $cfg['Servers'][$i]['password'] = ‘yournewpassword’

You can change Safe mode, the register globals settings and other php flags in C:\xampp\php\php.ini

Good luck! And remember that the best webserver is http://localhost/ ;).

Enjoyed this post? Subscribe to my RSS feed today!

3 Responses to “Easily Create a local webserver on your own PC”

  1. AvatarDavid
    Add rating 0  Subtract rating 0  

    1

    Now, if I wanted to would it be possible to use DynDNS to allow other people access to the site. So its like you having a real main website hosted at your house?.

  2. Avatarslayer
    Add rating 0  Subtract rating 0  

    2
    Author Comment

    yeah, you can do that w/o problems, just make sure nothing blocks port 80

    cheers,
    Tom

  3. pingback pingback:
    Add rating 0  Subtract rating 0  

    3
    XAMPP Tutorial

    [...] ThaSlayer.com, Easily Create a Local Webserver On Your Own PC. [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment Preview: