XAMPP Portabilization

  • XAMPP install path will be at [D:\x_dev].
  • HTDOCS - or the actual web site resources will be at [P:/DEVL/www/com/unityconstruct_dev/htdoc]
    • This just shows how to customize the default location for the XAMPP installation
  • I normally create 'c:\d' and then assign a mapped drive or use Subst
    • Recently, I've stopped with the 'D:' assignment as Win7 prevents programs on network drives to be pinned to the Start Menu or the Taskbar
    • Also, TortoiseSVN would pickup and scan repo's on BOTH 'c:\d' AND 'D:\' - effectively doubling its activity.
  •  

Apache & XAMPP

This walk through will be using XAMPP Control Panel with Port 85 & 443

 

D:\x_dev\apache\conf\httpd.conf

# -----------------------------------------------------------------

# -----------------------------------------------------------------

#    Variables for xampp exe dir and htdocs ( website ) dir

# -----------------------------------------------------------------

 

#${xampp_path}

Define xampp_path D:/x_dev

 

#${htdocs_path}

Define htdocs_path "P:/DEVL/www/com/unityconstruct_dev/htdocs"

 

# -----------------------------------------------------------------

# -----------------------------------------------------------------

 

#Apache Listen Port Address

Listen 85

 

#

ServerName localhost:85

 

 

DocumentRoot "${htdocs_path}"

<Directory "${htdocs_path}">

 

D:\x_dev\apache\conf\extra\httpd-xampp.conf

 

# -----------------------------------------------------------------

# -----------------------------------------------------------------

#    Variables for xampp exe dir and htdocs ( website ) dir

# -----------------------------------------------------------------

 

#${xampp_path}

Define xampp_path D:/x_dev

 

#${htdocs_path}

Define htdocs_path "P:/DEVL/www/com/unityconstruct_dev/htdocs"

 

# -----------------------------------------------------------------

# -----------------------------------------------------------------

 

 

<IfModule env_module>

    SetEnv MIBDIRS "${xampp_path}/php/extras/mibs"   

    SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"

    SetEnv OPENSSL_CONF "${xampp_path}/apache/bin/openssl.cnf"

    SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"

    SetEnv PHPRC "\\xampp\\php"

    SetEnv TMP "\\xampp\\tmp"

</IfModule>

 

 

 

 

#

# PHP-Module setup

#

LoadFile "${xampp_path}/php/php7ts.dll"

LoadFile "${xampp_path}/php/libpq.dll"

LoadModule php7_module "${xampp_path}/php/php7apache2_4.dll"

 

 

 

 

 

#

# PHP-CGI setup

#

#<FilesMatch "\.php$">

#    SetHandler application/x-httpd-php-cgi

#</FilesMatch>

#<IfModule actions_module>

#    Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"

#</IfModule>

 

 

<IfModule php7_module>

    PHPINIDir "${xampp_path}/php"

</IfModule>

 

 

ScriptAlias /php-cgi/ "${xampp_path}/php/"

<Directory "${xampp_path}/php">

    AllowOverride None

    Options None

    Require all denied

    <Files "php-cgi.exe">

          Require all granted

    </Files>

</Directory>

 

<Directory "${xampp_path}/cgi-bin">

    <FilesMatch "\.php$">

        SetHandler cgi-script

    </FilesMatch>

    <FilesMatch "\.phps$">

        SetHandler None

    </FilesMatch>

</Directory>

 

<Directory "${htdocs_path}/xampp">

    <IfModule php7_module>

        <Files "status.php">

            php_admin_flag safe_mode off

        </Files>

    </IfModule>

    AllowOverride AuthConfig

</Directory>

 

<IfModule alias_module>

    Alias /licenses "${xampp_path}/licenses/"

    <Directory "${xampp_path}/licenses">

        Options +Indexes

        <IfModule autoindex_color_module>

            DirectoryIndexTextColor  "#000000"

            DirectoryIndexBGColor "#f8e8a0"

            DirectoryIndexLinkColor "#bb3902"

            DirectoryIndexVLinkColor "#bb3902"

            DirectoryIndexALinkColor "#bb3902"

        </IfModule>

        Require local

        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

   </Directory>

 

    Alias /phpmyadmin "${xampp_path}/phpMyAdmin/"

    <Directory "${xampp_path}/phpMyAdmin">

        AllowOverride AuthConfig

        Require local

        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

    </Directory>

 

    Alias /webalizer "${xampp_path}/webalizer/"

    <Directory "${xampp_path}/webalizer">

        <IfModule php7_module>

            <Files "webalizer.php">

                php_admin_flag safe_mode off

            </Files>

        </IfModule>

        AllowOverride AuthConfig

        Require local

        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

    </Directory>

</IfModule>

 

 

 

 

<Directory "${htdocs_path}/xampp">

    <IfModule php7_module>

        <Files "status.php">

            php_admin_flag safe_mode off

        </Files>

    </IfModule>

    AllowOverride AuthConfig

</Directory>

 

 

SSL

D:\x_dev\apache\conf\extra\httpd-ssl.conf

 

# -----------------------------------------------------------------

# -----------------------------------------------------------------

#    Variables for ssl port

# -----------------------------------------------------------------

 

#${ssl_port}

Define ssl_port 446

 

# -----------------------------------------------------------------

# -----------------------------------------------------------------

 

#Listen 443 is Default

Listen ${ssl_port}

 

 

MySQL

C:\d\x_dev\mysql\bin\my.ini

 

# -----------------------------------------------------------------

# -----------------------------------------------------------------

# SSL Port Assignments

#    Must use Environment Variables, can't create any here

#    Perhaps create a bat file to start XAMPP...

#    ... that calls setenv.bat, then make assignments there that

#    ... can be referenced in the my.ini file

# -----------------------------------------------------------------

 

[client]

# password       = your_password

 

#port            = 3306

port             = 3305

 

 

# Here follows entries for some specific programs

 

# The MySQL server

[mysqld]

#port= 3306

port= 3305

 

 

 

Apache

xampp_dev

  • httpd.conf: D:\xampp_dev\apache\conf\httpd.conf

    • Define xampp_path D:/xampp_dev

    • Define htdocs_path P:/devl/www/com/silosix/dev_2014

    • Define apache_port 81

  • httpd-xampp.conf

  • httpd-ssl.conf

  • php.ini

xampp_test

  • httpd.conf: D:\xampp_test\apache\conf\httpd.conf

    • Define xampp_path D:/xampp_test

    • Define htdocs_path P:/devl/www/com/silosix/test_2014

    • Define apache_port 82

xampp_prod

  • httpd.conf: D:\xampp_prod\apache\conf\httpd.conf

    • Define xampp_path D:/xampp_prod

    • Define htdocs_path P:/devl/www/com/silosix/prod_2014

    • Define apache_port 83

MySQL

  • my.ini

  • db_conx.php

  • db_conx_test.php




 

TomCat

  • tomcat-users.xml

  • catalina.bat

  • catalina_start.bat

  • catalina_stop.bat

  • setclasspath.bat

  • setenv.bat

  • web.xml

  • server.xml

NetBeans

Custom JDK/JRE location

  • netbeans.conf

 

 

Tags