Friday, July 3, 2015

How to Set up a Personal Web Server with XAMPP

There are a number of Personal Web Server applications available on the Internet. XAMPP is one of the most robust, and compatible as far as offering a cross platform (multiple operating system) solution. This Personal Web Server application is available for Linux, Windows and Mac OS environments. It is also very easy to install, configure and use.
A Personal Web Server:

Allows you to work locally from your own machine for development.
Provides you a secure, private environment for developing that can be shared later.
Configures all of the necessary components of a Web Server for you without the complication.
This article will walk you through the basic setup and configuration steps needed to setup your own Personal Web Server using XAMPP.

Method One of Three:
Getting the Web Server Application

1
Go to the Apache Friends website and download the version of XAMPP for you computers operating system.

2
Click the link for your operating system and you will be redirected to the downloads page.

3
On this page, click on the link for download XAMPP. You can come back to this page later and download some of the add-ons and other utilities available so you may want to bookmark this page. Once you click on the XAMPP link, you will see the following page:

4
You will probably want to select the EXE file download as it is completely automated. If you download the ZIP file, you may need to perform some steps manually which are not covered in this post. The ZIP file is also much larger in size than the compressed EXE installation file. After clicking on the EXE file, select a location on your computer to save the file. For ease of locating the file, you may want to save it to your desktop.

Method Two of Three:
Installing the Web Server Application
1
After the download is complete, you may run the installation program by double clicking on the icon for the recently downloaded file. You will then be presented with an installation configuration window.


Here you are asked where you would like to install the personal web server application. The default is to the C:\ drive when installing on a PC. This is probably the best location.


2
Click OK and the installation will begin by creating a directory on C:\ (if you accepted the default) named ‘xampp’. Now all files will be installed to ‘C:\xampp’. Allow the installation routine to run until you see the following screen:
XAMPP has now opened up its own command line installation routine and will ask you a few questions about installing your files. Your best option is to accept the defaults for the following screens:

3
After accepting the defaults, you will then see the following menu:
Press the ‘x’ key and then press enter to exit this console installation window. You should now have a new icon on your desktop for XAMPP.

Method Three of Three:
Configuring your Personal Web Server

1
To begin the configuration process for your web server, double click on the newly created XAMPP desktop icon. You should then be shown the XAMPP Control Panel.
2
Let’s get started with the Configuration by clicking the Start buttons next to Apache and MySQL.

3
After clicking the Start buttons, you may see a couple of Windows Messages as follows:
If you want your web server to be available to other people on an office network, you can click the ‘Unblock’ button. Otherwise, it is best for security reasons to click the ‘Keep Blocking’ buttons.




There are times when you may click on “Start” to start the Web Server and it does not want to start. This is usually due to another program using the same port as the web server. The most common conflict is with Skype. If your web server will not start and you are running Skype, close Skype (right-click and select Exit from the Menu) and try to start the web server again.

4
Now, start your Web Browser and in the Web Address area at the top, type in the following: http://localhost/.
If everything is working properly, you should see the following screen:


5
Click on the language of your choice to continue to the configuration page. You should now see the following screen in your web browser:
From this screen you can administer your web server and any of the other components you have installed. This is the same screen you would see if you clicked on the Admin button next to the Apache application in the XAMPP Control Panel. There are also a few demo applications here that you can use to get you started.


6
Let’s start have a look at the Status page to see what we still need to configure by clicking on the Status menu item on the left hand side.
The system application components are listed in order of importance with a Red, Yellow or Green color indicating the components current status. You will notice that the first item is red, “MySQL Database – Deactivated”. This is because we need to secure the database with a password before the system will allow us to use it with our web server.

Don’t worry too much about the last three items as few people will ever use these components. If you do need assistance with configuring these items, you can refer to the online documentation provided at Apache Friends.




1
In order to finish our configuration, let’s click on the Security Menu item on the left side. This should open up a new tab in your browser as follows:
Again, there is not much to worry about with the last three items. But the first three indicate a lack of password protection, or visibility by the public, of some of the web server components.


2
Click on the link provided in this web page to fix these items and you will see the following page:
On this page, provide a password for your MySQL root user and click on the “Password Changing” button. If you also want to password protect the development directory (http://localhost/) you can do this here as well and click on the ‘Save’ button.

click the check boxes provided on this page as it will write out your passwords to a file on your PC in the unfortunate event that you forget your login information.


3
Now if we click on the Status menu item on the left again, we should see all of the critical items colored in green.

4
Let’s double check the login information for your database user name and password real quick. Go back to the XAMPP Control Panel window and click on the Admin button next to the MySQL application. You should see a login window for phpMyAdmin as follows:

5
Enter in the user name provided by the system (‘root’) and enter in the password you provided. If all is working, you should be presented with the phpMyAdmin console.

6
Congratulations! You have just successfully setup you very own Personal Web Service on your PC for performing Web Design tasks locally.
At this point, you can Stop the Apache and MySQL applications and rename the file in your xampp directory called ‘htdocs’ to ‘htdocs_default’. You can then create a new, empty directory called ‘htdocs’ for my own Web Design projects.

No comments:

Post a Comment