KEMBAR78
How To Use XAMPP To Run Your Own Web Server | PDF | World Wide Web | Internet & Web
0% found this document useful (0 votes)
44 views9 pages

How To Use XAMPP To Run Your Own Web Server

XAMPP is a cross-platform software package that includes Apache, MySQL, PHP, and Perl, allowing developers to easily set up a local web server for testing. The installation process involves downloading the XAMPP installer, configuring components, and testing the setup by creating a simple PHP file. Additionally, the document provides instructions on securing MySQL and PhpMyAdmin, as well as creating user accounts for PhpMyAdmin.

Uploaded by

Mik Mar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views9 pages

How To Use XAMPP To Run Your Own Web Server

XAMPP is a cross-platform software package that includes Apache, MySQL, PHP, and Perl, allowing developers to easily set up a local web server for testing. The installation process involves downloading the XAMPP installer, configuring components, and testing the setup by creating a simple PHP file. Additionally, the document provides instructions on securing MySQL and PhpMyAdmin, as well as creating user accounts for PhpMyAdmin.

Uploaded by

Mik Mar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

How to Use XAMPP to Run Your Own Web Server

XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P). It is a
simple, lightweight Apache distribution that makes it extremely easy for developers to create a local
web server for testing purposes. Everything you need to set up a web server – server application
(Apache), database (MySQL), and scripting language (PHP) – is included in a simple extractable
file. XAMPP is also cross-platform, which means it works equally well on Linux, Mac and
Windows. Since most actual web server deployments use the same components as XAMPP, it
makes transitioning from a local test server to a live server is extremely easy as well. Web
development using XAMPP is especially beginner friendly, as this popular PHP and MySQL for
beginners course will teach you.

What’s Included in XAMPP?


XAMPP has four primary components. These are:

1. Apache: Apache is the actual web server application that processes and delivers web content to a
computer. Apache is the most popular web server online, powering nearly 54% of all websites.

2. MySQL: Every web application, howsoever simple or complicated, requires a database for
storing collected data. MySQL, which is open source, is the world’s most popular database
management system. It powers everything from hobbyist websites to professional platforms like
WordPress. You can learn how to master PHP with this free MySQL database for beginners course.

3. PHP: PHP stands for Hypertext Preprocessor. It is a server-side scripting language that powers
some of the most popular websites in the world, including WordPress and Facebook. It is open
source, relatively easy to learn, and works perfectly with MySQL, making it a popular choice for
web developers.

4. Perl: Perl is a high-level, dynamic programming language used extensively in network


programming, system admin, etc. Although less popular for web development purposes, Perl has a
lot of niche applications.

Different versions of XAMPP may have additional components such as phpMyAdmin, OpenSSL,
etc. to create full-fledged web servers.

How to Install XAMPP?


[Note: For the purpose of this XAMPP tutorial, we’ll assume that you’re using a Windows PC,
although these instructions work equally well for Mac computers. Linux users, however, should
refer to the official XAMPP Linux installation guide.]

Head over to XAMPP for Windows homepage on ApacheFriends.org. Here, you will find multiple
versions of XAMPP.

In this tutorial, we will install XAMPP Windows 1.8.2 which includes:

Component Description Version


Apache Default web server application 2.4.4
MySQL Database management system 5.5.32
PHP Server-side, general purpose programming language 5.4.19
phpMyAdmin Admin tool for working with MySQL 4.0.4
OpenSSL An open-source implementation of two popular security 0.9.8
protocols – SSL and TSL
XAMPP Control Panel A simple control panel for working with different XAMPP 3.2.1
components
Webalizer An analytics tool that generates user logs and usage metrics. 2.23-04
Mercury Mail Transport A simple, open-source mail server 4.62
System
FileZilla FTP Server A FTP (File Transfer Protocol) server to make file transfers 0.9.41
smoother
Tomcat A freeware Java servlet for serving Java applications 7.0.42
Strawberry Perl A popular distribution of Perl for Windows 5.16.3.1

Unless you are running a live web server, you won’t need anything beyond Apache, MySQL and
PHP, although it is a good practice to install all other components as well.

You also have the option of installing a smaller ‘XAMPP Portable Lite’ version, which only
includes essential Apache, MySQL, PHP and phpMyAdmin components.

Downloading XAMPP

XAMPP is available in three file formats:

 .EXE – Self-executable file; easiest to install.


 .7z – 7zip file. Favored by purists, although it requires working with more complicated .bat
files to install.
 .ZIP – Compressed zip file. Like .7z, installing through .ZIP files is considerably more
difficult than using .EXE

Since .EXE is the easiest to install, we will use this file format for this tutorial.

You can download the XAMPP installer from Sourceforge here (102MB).

Installing XAMPP

Follow these steps for installing XAMPP:

Step 1: Disable your anti-virus as it can cause some XAMPP components to behave erratically.

Step 2: Disable User Account Control (UAC). UAC limits write permissions to XAMPP’s default
installation directory (c:/Program Files/xampp), forcing you to install in a separate directory. You
can learn how to disable UAC here. (Optional)

Step 3: Start the installation process by double-clicking on the XAMPP installer. Click ‘Next’ after
the splash screen.
Step 4: Here, you can select the components you want to install. Choose the default selection and
click ‘Next’.

Step 5: Choose the folder you want to install XAMPP in. This folder will hold all your web
application files, so make sure to select a drive that has plenty of space.
Step 6: The next screen is a promo for BitNami, an app store for server software. Deselect the
‘Learn more about BitNami for XAMPP’ checkbox, unless you actually enjoy receiving promo
mails!

Step 7: Setup is now ready to install XAMPP. Click Next and wait for the installer to unpack and
install selected components. This may take a few minutes. You may be asked to approve Firewall
access to certain components (such as Apache) during the installation process.

Step 8: Installation is now complete! Select the ‘Do you want to start the Control Panel now?’
checkbox to open the XAMPP control panel.
Understanding XAMPP Control Panel
The XAMPP control panel gives you complete control over all installed XAMPP components. You
can use the CP to start/stop different modules, launch the Unix shell, open Windows explorer and
see all operations running in the background.

Here is a quick overview of the Control Panel. For now, you only need to know how to start and
stop an Apache server.

Testing Your XAMPP Installation


Follow these steps to test your XAMPP installation by launching the Apache web server and
creating a simple PHP file.
Step 1: In the XAMPP control panel, click on ‘Start’ under ‘Actions’ for the Apache module. This
instructs XAMPP to start the Apache webserver.

Step 2: Open your web browser and type in: http://localhost or 127.0.0.1

Step 3: Select your language from the splash screen.

Step 4: You should see the following screen. This means you’ve successfully installed XAMPP on
your computer.

Step 5: We will now test whether XAMPP has installed PHP successfully. To do this, fire up
Notepad and type the following into a new document:

<?php

echo ‘Hello world’;

?>

Save this file as ‘test.php’ in c:\xampp\htdocs\ (or whichever directory you installed XAMPP in).

Step 6: Navigate to localhost/test.php. You should see the “Hello World” message:
Congratulations! You have now successfully installed XAMPP and even written your very first
PHP program. You can now use your local Apache webserver to create and test complex PHP web
apps, fiddle around with MySQL and even learn how actual web servers work with Tomcat,
FileZilla, OpenSSL, and more. You can get started right away by learning LAMP development
from the ground up in this course. Take this course for a more comprehensive take on programming
with PHP and MySQL.

As always, we’d love to hear your thoughts and opinions on web development using XAMPP in the
comments below!
XAMPP Configuration to Secure MySQL, PhpMyAdmin and Localhost

This is a note how to configure XAMPP after installing Xampp in your computer. You can
download the installer in this link http://www.apachefriends.org/en/xampp-windows.html#641

1. How to secure the MySQLand PhpMyAdmin after finished Installing Xampp (Please see Figure
1):
- Open the browser
- Type http://localhost/security/xamppsecurity.php
- Type New Password for MySql Root password
- Check “http”
- Hit button “Password changing”

2. How to secure localhost (Please see Figure 1):


- Still in the http://localhost/security/xamppsecurity.php
- Type “root” for User textfield on the XAMPP DIRECTORY PROTECTION (.htaccess)
- Type the password
- Hit button “Make safe the XAMPP directory”

Notes : After you hit button “Make safe the XAMPP directory”, the data will be safed in the
following file:
C:\xampp\security\xampp.users
C:\xampp\htdocs\xampp\.htaccess

After you did the Instruction #1 and #2, the localhost (xampp configuration) will need authorization
permission everytime user access it,
but any user can still access their projects that they put in “htdocs” folder by typing
“localhost/[project folder or project name]“

Figure 1: XAMPP user interface

3. Create PhpMyAdmin Account User


- Access PhpMyAdmin site by typing http://localhost/phpmyadmin/ on the browser
- Type “root” for User Name
- Type the password
- After you have been granted for accessing PhpMyAdmin, Click “Users” tab
- Click “Add user”
- Type the User name
- Pick “Local” on the Host drop-down list
- Type the Password
- The button “Generate” password is optional, so I reccomend not to click it
- Pick any kind of privilege for the new user
- Hit button “Add user”

You might also like