From ArchWiki
Revision as of 16:04, 26 February 2011 by Schivmeister (Talk | contribs) (Hosting files outside the htdocs directory)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. It contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.




  1. Download the latest version from here.
  2. In the terminal run the following from the folder where the archive was downloaded to:
    sudo tar xvfz xampp-linux-*.tar.gz -C /opt
Note: If you are running 64-bit arch, you must install lib32-glibc and lib32-gcc-libs.
sudo pacman -S lib32-glibc lib32-gcc-libs
to do this you must have activated the multilib repositorie in /etc/pacman.conf


Setting the individual parts of XAMPP can by made by editing following files:

/opt/lampp/etc/httpd.conf - Apache configuration. For example you can change folder with web page's source files.

/opt/lampp/etc/php.ini - PHP configuration.

/opt/lampp/phpmyadmin/config.inc.php - phpMyAdmin configuration.

/opt/lampp/etc/proftpd.conf - proFTP configuration.

/opt/lampp/etc/my.cnf - MySQL configuration.

If you would like to set up security of server, you can do it simply by this command:

sudo /opt/lampp/lampp security

You will be asked step by step to choose passwords for web page's access, user "pma" for phpMyAdmin, user "root" for MySQL and user "nobody" for proFTP.


Use the following commands to control XAMPP:
sudo /opt/lampp/lampp {start,stop,restart}


All the files needed by Xampp to be installed are located in the previous /opt/lampp folder. So, to uninstall Xampp, consider this command.

# rm -rf /opt/lampp

NOTE:If you had create symlinks, you need to destroy them too!

Hosting files outside the htdocs directory

The document root (web root) directory is located at /opt/lampp/htdocs/. All files placed in this directory will be processed by the web server.

To host other files on your system with XAMPP, you can configure an alias with apache.

  1. Edit apache's httpd.conf with your favorite editor.
    nano /opt/lampp/etc/httpd.conf
  2. In the Alias section, add an alias:
<IfModule alias_module>
    Alias /test /home/web
        <directory /home/web>
            AllowOverride FileInfo Limit Options Indexes
            Order allow,deny
            Allow from all



You also have to change the permissions. You can use your own username, and leave the group setting alone. In that case, any folder where you have access will work. Another way is to leave the user setting, and change the group to something else which your user is part of (for when you want to restrict a folder to be group-writable only). Yet another way is to just change both user and group to 'http', which should already exist. In this case, all folders you want to allow for processing must belong to at least the 'http' group.

<IfModule !mpm_netware_module>
User http
Group http
Now don't forget to restart apache:
/opt/lampp/lampp restart

This will allow you to host files from your home directory (or any other directory) with XAMPP.

In the above example, you can access the files by pointing your web browser to localhost/test.