How to set up your own server using XAMPP
This article describes how to create your own server under Windows XP using XAMPP package.
There are many webmasters who prefer to host their websites on their own servers instead of using the services of hosting providers. This might be a difficult task especially for beginners.This could be even more difficult when you must add support for the MySQL database ( for example: you need MySQL database in order to install forum or blog on your site) , PHP and Perl. But don’t worry there is always an easy way and it is called XAMPP.
What is XAMPP ?
It is an installation package, which includes Apache web server, MySQL database server, PHP, Perl, FTP server and phpMyAdmin. The most important thing is that it’s free and easy to install. It comes in both a full, standard version and a smaller version (known as XAMPP Lite). The main advantage of XAMPP package is that its installing takes less time than installing each of its components separately.
The current version of XAMPP 1.7.0 includes:
Apache 2.2.11 + MySQL 5.1.30 (Community Server) + PHP 5.2.8 + PEAR(Support for PHP 4 has been discontinued) + PHP-Switch win32 1.0 (use "php-switch.bat" in the xampp main directory) + XAMPP Control Version 2.5 from www.nat32.com + XAMPP Security 1.0 + SQLite 2.8.15 + OpenSSL 0.9.8i + phpMyAdmin 3.1.1 + ADOdb 4.990 + Mercury Mail Transport System v4.52 + FileZilla FTP Server 0.9.29 + Webalizer 2.01-10 + Zend Optimizer 3.3.0 + eAccelerator 0.9.5.3 for PHP 5.2.8 (but not activated in the php.ini)
How to install?
You may install XAMPP using the installer or the zip archive which can be downloaded from here. However, using the installer version is easier because almost all settings and configurations will be made by the program for you.
Now let’s get through the installation process of XAMPP under Win XP. Here I will use the installer version.
When double click on the installer icon you will see the following window.Here you can choose what language to be used during the installation process. Click Next.
————————————————————————————————
When the welcome screen appears click Next again.
————————————————————————————————
Now choose the folder where XAMPP to be installed and click Next.
————————————————————————————————
Now you have to make some settings. In the next window you can choose whether Apache , MySQL and Filezilla to be installed as a services. It means that they will start automatically every time you start Windows. Otherwise you will need to use the XAMPP Control Panel application to start the servers individually each time you need them.However if you intend to use the server just for testing from time to time then better don’t choose these options. When you are ready with the settings click Install.
————————————————————————————————
The next window shows the installation process.
————————————————————————————————
Wait until the process completes and click Finish.
The next window will announce that the installation process is successfully completed and you will be asked to start the XAMPP Control Panel.
Now you are ready to start the XAMPP Control Panel. Here you will find all the settings needed for configuring your server.When the status of individual modules is Running – this means that they are started and work normally.
Once XAMPP is installed it’s recommended to make some settings to improve the protection of the server in order to prevent it from unauthorized access.
The first thing you have to do is to test your server. To do that just click on the Apache Admin button in the XAMPP Control panel. If you see the initial screen of your server it means that XAMPP is installed successfully.
Click Status, to see the status of the server. From here you can view the status of all components. When an component is ACTIVATED, it means it is active and running. You can START/STOP every individual component using the control panel.
Click Security, to see the protection level of the server. As you can see as all modules are UNSECURE. This is so because XAMPP is made mainly for development use and is configured to be open as possible to provide more flexible work environment. The next window lists the problems associated with the security of your server. Now we will try to fix each one of them. To do that click the link at the bottom of the window.
You will see following page:
Here are the settings for MySQL SuperUser password. You have to set up new password for that user because at this moment everybody can access your database. When you are done click on Password changing.
Here are also the settings for the XAMPP directory protection. Seting up a new user name and password will prevent the server from unautorized access. If you check the option Safe plain password in text file? your passwords will be stored in a text file. This is helpful in case you accidentally forget your password.
Restart XAMPP. If everything is right you will see the following window:
Enter the name and password you chose in the XAMPP Directory protection and click OK. Now let’s make the security settings for FileZilla and Mercury Mail Server.
Open the ControlPanel and click the admin button of FileZilla.
Here are the settings for the server address and the port used for connecting. I recommend to leave the default settings and just click OK.
This is the main window of the FTP server where you can control all its functions like
- Adding or removing users
- Determining their access rights
- Disabling access to certain files and folders
- Configuring transfer speed limits
- Choosing between different transfer protocols like FTP, FTP over SSL/TLS (FTPS) and SSH File Transfer Protocol (SFTP)
- Setting up an IP filter that allows only certain IP addresses to access the server
The next thing you have to do is to remove the anonymous user and change the password of the user newuser.
In the users field select anonymous and click Remove. Then select newuser , enter the new password and click OK.
Now it is time for securing the Mercury Mail serve. The problem here is that during the installation is created a test user acount through which anyone can access the server.That’s why this account has to be deleted. Open XAMPP Control Panel and click the Mercury Admin button. On the next window click Configuration and select Manage local users option.
Now select newuser , click Delete and then Close.
That’s it.The Mail server is secured and you can check again the security page and to see what is the security status of the different modules.
As yo can see all modules are secured except the PHP module. I left it unsecure because I use the server only for testing and when PHP is switched to Safe mode some of its functions are not active.If you are the only user of the server you do not have to enable “safe mode”, however if you want to do this, click the More info link for more information.
Well, I thinnk that the server is ready for use and you can begin to test its capabilities. Also remember to read the documentation .





















March 18th, 2009 at 23:58
Hi! I just installed linux on my pc and I wonder whether this package could be installed on my linux.
March 19th, 2009 at 14:59
There is XAMPP package developed for Linux systems.
http://www.apachefriends.org/en/xampp-linux.html
There is also an installation manual on the site but it’s a good idea first to check your distribution repositories if they contain XAMPP.You can do that by package manager installed on your system.
June 23rd, 2009 at 21:38
Hey, Good Instructions but, My Security Says : FORBIDDEN FOR CLIENT ( Local Host ) , I But ( local Host ) Cause thats where my ip is, dunno what happened?
July 2nd, 2009 at 21:39
ai, i’m trying to connect my page using another computer. I put(http://mycomputerip/xampp) and load the xampp main page from another pc successfully. This is the main page of xampp. i want to open my main page in another pc so i can enter all information from there to the database in my server side pc. is this can happen somehow?
July 9th, 2009 at 8:15
@Hey Alexander,
- Tip 1: Go to xampp\apache\conf\extra and edit the file httpd-xampp.conf, There you’ll find the access policy for many resources.
- Tip 2: If you have an old version of xampp, probably you’ll find it using (localhost) replace it with 127.0.0.1 (this solves half of the problems)
- Tip 3: Check out where there is “Deny from all” and add another line with the IP of the computer you want to grant access like : “Allow from 10.120.120.10″
Hope this helps.
@mohd nasrul:
Yes, just create a folder under htdocs let’s say “myfuturesite” and access it with http://XX.XX.XX.XX/myfuturesite, for mysql databases just use phpmyadmin
Hope this helps.
July 9th, 2009 at 8:27
Btw,
Does anybody know if the access to apache service under windows server (2003 in my case), does it depend on OS licences, i.e : if i have 10 windows licences are users to the local website limited to 10?
Thanks for the nice post.
August 1st, 2009 at 16:44
Lots of tutorials out there about using using XAMPP as a local server, but this is the first one I’ve found that mentions security.
Good use of screenshots to explain the text and lots of security info… I’ll start reading now.
September 4th, 2009 at 12:37
Hi,
I’ve started using XAMPP recently for PHP/MySQL. I want to set up a Mail Server using XAMPP. I tried using mercury and sending mail from admin@localhost to admin@localhost and got a mail successfully sent alert. But I could not find the sent mail stored in the XAMPP directory(the files where the sent mail is stored, mentioned in XAMPP docs). Please suggest if any other changes are to be made. I use Windows Vista and Apache, MySQL have been running perfectly fine.