Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Install and configure XAMPP 1.7.2 for Windows

PREREQUISITES

1
indent
Panel
1

Before

you

begin,

you

must

have

done

the

following:

{panel}


indent
1
1

* Downloaded XAMPP 1.7.2, the Basic Package (do not use the Lite version).  Download the *exe* self-extracting RAR archive (
I used
use xampp-win32-1.7.2.exe).\\
\\
You can view all 
version
versions of XAMPP which are available for download at [http://sourceforge.net/projects/xampp/files/|http://sourceforge.net/projects/xampp/files/], or\\
\\
* Download [
^xampp
Install and configure XAMPP 1.7.2^xampp-win32-1.7.2.exe] directly from this page.
\\
{panel}


1.

...

  Install XAMPP 1.7.2

Panel
indent
1
1

{panel}
Execute *xampp-win32-1.7.2.exe*.\\
\\
Verify that the *Destination folder* is c:\ as shown below.\\
\\
           !xampp1.7.2-InstallationLocation.jpg!\\
\\
Click the *Install* button to finish the installation.  When prompted, take the default value.\\
\\ {panel}

2.

...

  Grant access to XAMPP 1.7.

...

2 by IP address

Panel
indent
1
1
{panel}

Access to XAMPP is controlled by using a simply *username* and *password*.  It is recommended that XAMPP be further locked down allowing access to specified IP addresses.  This can be accomplished by making modifications to the apache *httpd-xampp.conf* configuration file as described below:\\
Below is the *http-xampp.conf* files that is initially installed by the XAMPP installer.\\ \\
\\
Edit *c:\xampp\apache\conf\extra\httpd-xampp.conf* and 
can
find 
be
the 
found
entry 
at
shown 
*c
below:
\xampp
\
apache
\
conf\extra*.\\

\\
*Original httpd-xampp.conf*\\
\\
{code}
# XAMPP settings # <IfModule alias_module> <IfModule mime_module> #ScriptAlias /php/ "C:/xampp/php/" #Action application/x-httpd-php "/php/php-cgi.exe" PHPINIDir "C:/xampp/php" LoadModule php5_module "C:/xampp/apache/bin/php5apache2_2.dll" AddType text/html .php .phps .php5 .php4 .php3 .phtml .phpt <FilesMatch "\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$"> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> <Directory "C:/xampp/htdocs/xampp"> <IfModule php5_module> <Files "status.php"> php_admin_flag safe_mode off </Files> </IfModule> </Directory> Alias /security "C:/xampp/security/htdocs/" <Directory "C:/xampp/security/htdocs"> <IfModule php5_module> <Files "xamppsecurity.php"> php_admin_flag safe_mode off </Files> </IfModule>
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    
Deny from all
    
Allow from ::1 127.0.0.
1 </Directory> Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
0/8 \
    
<Directory
 
"C:/xampp/phpMyAdmin">
        
AllowOverride
 
AuthConfig Order allow,deny Allow from all </Directory> Alias /webalizer "C:/xampp/webalizer/" <Directory "C:/xampp/webalizer"> <IfModule php5_module> <Files "webalizer.php"> php_admin_flag safe_mode off </Files> </IfModule> AllowOverride AuthConfig
 fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
        
Order
 
allow,deny
      
Allow from all </Directory> Alias /contrib "C:/xampp/contrib/" <Directory "C:/xampp/contrib"> <IfModule php5_module> <Files "webalizer.php"> php_admin_flag safe_mode off </Files> </IfModule> Order deny,allow Deny from all Allow from 127.0.0.1 </Directory> </IfModule> </IfModule> # Access restriction via Remote <IfModule auth_remote_module> <Directory "C:/xampp/htdocs/fonts"> AllowOverride All AuthType Basic AuthName "AUTH REMOTE TEST" AuthRemoteServer localhost AuthRemotePort 80 AuthRemoteURL /forbidden/ Require valid-user #User: user / Password: pass </Directory> </IfModule> # Access restriction via MySQL <IfModule mysql_auth_module> <Location /restricted> AuthMySQLEnable On AuthName "MySQL Secured Place" AuthType Basic require valid-user AuthMySQLHost localhost AuthMySQLUser root # AuthMySQLPassword AuthMySQLDB webauth AuthMySQLUserTable user_pwd AuthMySQLNameField name AuthMySQLPasswordField pass AuthMySQLPwEncryption none </Location> </IfModule>
fe80::/10 169.254.0.0/16

    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
{code}
\\
Two
Add 
things
the 
must be done in order to control access via IP addresses.\\ \\ FIRST:&nbsp;&nbsp;In the *original httpd-xampp.conf*, notice that each *Directory* directive has it's own *Order*, *Deny* and *
IP addressed to the *Allow from* element
.&nbsp;&nbsp;To control access via IP addresses, the *Order*, *Deny* and *Allow from* elements must be removed from all the *Directory* directives.\\ \\ SECOND:&nbsp;&nbsp;Insert the *LocationMatch* directive below at end of the *httpd-xampp.conf* file.
 that are to have access to XAMPP as illustrated below.&nbsp;&nbsp;The IP addresses 18.19.1.231 and 18.19.5.190 are included only as an example of how to enable an IP address.&nbsp;&nbsp;Be sure to change (or remove) these 2 IP address to suit your requirements.\\
\\
You must *restart apache* after you have made and saved these changes to *httpd-xampp.conf*.\\
\\
You can download a completed version of [
^httpd-xampp
Install and configure XAMPP 1.7.2^httpd-xampp-1.7.2.conf] directly from this page.&nbsp;&nbsp;{color:red}Don't forget to rename httpd-xampp-1.7.2.conf to *httpd-xampp.conf* and to *remove or change* the 2 IP address lines (::2 18.19.1.231 and ::3 18.19.5.190){color}.
{code}
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.
1
0/8 \
               ::2 18.19.1.231 \
               ::3 18.19.5.190 \
               fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
               fe80::/10 169.254.0.0/16

    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
{code}
{panel}

3.  Change the apache ServerName

Panel
indent
1
1

Edit c:\xampp\apache\conf\httpd.conf and find the line *ServerName localhost:80* and replace *localhost* with the name of the server.\\
\\
For example, if the server name is *chongqing.mit.edu*, the line would read *ServerName chongqing.mit.edu:80*\\
\\
Save the change.\\

4.  Verify the XAMPP 1.7.2 installation

Panel
indent
1
1

Restart apache.\\
\\
Open a web browser on the localhost and go to [*http://localhost/xampp* | http://localhost/xampp]\\
\\
If everything is correctly configured, the following should be displayed:\\
\\
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !xamppWelcome.jpg! \\
\\
The *DocumentRoot* is *C:\xampp\htdocs*.\\