How to make installed xampp portable?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to make installed xampp portable?

Postby borus » 16. December 2016 12:23

Hello, friends!

I installed XAMPP 1.8.3 to the pendrive(usb stick). When I checked apache httpd.conf file I've found that all settings are binded with the letter of the pendrive which was assigned by the Windows OS. At another Windows computer the letter of my pendrive can be different.

Is it possible to make the installed XAMPP portable and independent from the specific letter of a pendrive in operating system?
borus
 
Posts: 12
Joined: 22. March 2012 06:22
XAMPP version: 1.8.3
Operating System: Windows 8.1

Re: How to make installed xampp portable?

Postby Nobbie » 16. December 2016 12:46

Of course, remove the drive letters. But there is already a portable Xampp Version which suppresses drive letters. You only have to rebuild quite the same configuration as in the portable Xampp Version.

Here https://sourceforge.net/projects/xampp/ ... ows/1.8.3/ you can find all Xampp Packages Version 1.8.3. including the packages for a portable version.
Nobbie
 
Posts: 9689
Joined: 09. March 2008 13:04

Re: How to make installed xampp portable?

Postby borus » 16. December 2016 12:53

Nobbie wrote:Of course, remove the drive letters. But there is already a portable Xampp Version which suppresses drive letters. You only have to rebuild quite the same configuration as in the portable Xampp Version.

Here https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.8.3/ you can find all Xampp Packages Version 1.8.3. including the packages for a portable version.

Thank you!
The installed site is huge and it will take to much time to install portable XAMPP and the site again. So I have to simply erase "F:/" in all places of httpd.conf and mysql configuration file, don't I?
borus
 
Posts: 12
Joined: 22. March 2012 06:22
XAMPP version: 1.8.3
Operating System: Windows 8.1

Re: How to make installed xampp portable?

Postby borus » 16. December 2016 13:16

Strange. I've installed portable version(xampp-portable-win32-1.8.3-5-VC11-installer.exe) at pendrive and taken a look at its httpd.conf and I found "F:/" still there... I also tried to launch the copy of installed XAMPP without inserted pendrive and this led to mistake. But when i inserted usb stick back Apache run successfully. That is the dependency with the orirginal installation path still exists :shock: :? :?:
borus
 
Posts: 12
Joined: 22. March 2012 06:22
XAMPP version: 1.8.3
Operating System: Windows 8.1

Re: How to make installed xampp portable?

Postby Nobbie » 16. December 2016 15:27

I haven't used the portable version yet, but as far as i know, there is a readme or similar which tells to execute a setup_xampp.bat (or similar) after installation, which might fix the drive letters. I am not sure about that, but i have something like that in mind.

In fact it should be sufficient to remove all drive letters, but be sure to start Apache/MySQL from the same drive as your DocumentRoot and MySQL data folder.
Nobbie
 
Posts: 9689
Joined: 09. March 2008 13:04

Re: How to make installed xampp portable?

Postby borus » 16. December 2016 15:56

Nobbie wrote:I haven't used the portable version yet, but as far as i know, there is a readme or similar which tells to execute a setup_xampp.bat (or similar) after installation, which might fix the drive letters. I am not sure about that, but i have something like that in mind.

In fact it should be sufficient to remove all drive letters, but be sure to start Apache/MySQL from the same drive as your DocumentRoot and MySQL data folder.

Thank you.
In readme there is a line:
Please do not use the "setup_xampp.bat" for an USB stick installation!


I changed pathes in configuration files and now apache can't be launched and there is no information about what is wrong in a console or log files. Please help me to know what is going on :)

Here is httpd.conf:
Code: Select all
ServerRoot "apache"
Listen 80
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_lock_module modules/mod_dav_lock.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule status_module modules/mod_status.so

<IfModule unixd_module>
User daemon
Group daemon
</IfModule>

ServerAdmin postmaster@localhost

ServerName localhost:80

<Directory />
    AllowOverride none
    Require all denied
</Directory>

DocumentRoot "../htdocs"
<Directory "../htdocs">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
</Directory>

<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>

<Files ".ht*">
    Require all denied
</Files>

ErrorLog "logs/error.log"

LogLevel warn

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access.log" combined
</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/cgi-bin/"
</IfModule>

<IfModule cgid_module>
</IfModule>

<Directory "/cgi-bin">
    AllowOverride All
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddHandler cgi-script .cgi .pl .asp
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</IfModule>

<IfModule mime_magic_module>
    MIMEMagicFile "conf/magic"
</IfModule>

Include conf/extra/httpd-mpm.conf
Include conf/extra/httpd-multilang-errordoc.conf
Include conf/extra/httpd-autoindex.conf
Include conf/extra/httpd-languages.conf
Include conf/extra/httpd-userdir.conf
Include conf/extra/httpd-info.conf
Include conf/extra/httpd-vhosts.conf
Include "conf/extra/httpd-proxy.conf"
Include "conf/extra/httpd-default.conf"
Include "conf/extra/httpd-xampp.conf"

<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>

Include conf/extra/httpd-ssl.conf
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

AcceptFilter http none

<IfModule mod_proxy.c>
<IfModule mod_proxy_ajp.c>
Include "conf/extra/httpd-ajp.conf"
</IfModule>
</IfModule>


and here is httpd-xampp.conf:
Code: Select all
<IfModule env_module>
    SetEnv MIBDIRS "../../../php/extras/mibs"
    SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
    SetEnv OPENSSL_CONF "F:/xamp_port/apache/bin/openssl.cnf"
    SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"
    SetEnv PHPRC "\\xampp\\php"
    SetEnv TMP "\\xampp\\tmp"
</IfModule>

LoadFile "../php/php5ts.dll"
LoadFile "../php/libpq.dll"
LoadModule php5_module "../php/php5apache2_4.dll"

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

<IfModule php5_module>
    PHPINIDir "../php"
</IfModule>

<IfModule mime_module>
    AddType text/html .php .phps
</IfModule>

ScriptAlias /php-cgi/ "../php/"
<Directory "../php">
    AllowOverride None
    Options None
    Require all denied
    <Files "php-cgi.exe">
          Require all granted
    </Files>
</Directory>

<Directory "../cgi-bin">
    <FilesMatch "\.php$">
        SetHandler cgi-script
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler None
    </FilesMatch>
</Directory>

<Directory "../htdocs/xampp">
    <IfModule php5_module>
       <Files "status.php">
          php_admin_flag safe_mode off
       </Files>
    </IfModule>
    AllowOverride AuthConfig
</Directory>

<IfModule alias_module>
    Alias /security "../security/htdocs/"
    <Directory "../security/htdocs">
        <IfModule php5_module>
          <Files "xamppsecurity.php">
             php_admin_flag safe_mode off
          </Files>
        </IfModule>
        AllowOverride AuthConfig
        Require all granted
   </Directory>

    Alias /licenses "../licenses/"
    <Directory "../licenses">
        Options +Indexes
        <IfModule autoindex_color_module>
            DirectoryIndexTextColor  "#000000"
            DirectoryIndexBGColor "#f8e8a0"
            DirectoryIndexLinkColor "#bb3902"
            DirectoryIndexVLinkColor "#bb3902"
            DirectoryIndexALinkColor "#bb3902"
        </IfModule>
        Require all granted
   </Directory>

    Alias /phpmyadmin "../phpMyAdmin/"
    <Directory "..">
        AllowOverride AuthConfig
        Require all granted
    </Directory>

    Alias /webalizer "../webalizer/"
    <Directory "../webalizer">
        <IfModule php5_module>
          <Files "webalizer.php">
             php_admin_flag safe_mode off
          </Files>
        </IfModule>
        AllowOverride AuthConfig
        Require all granted
    </Directory>
</IfModule>

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
        Require local
   ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>


Here is the printscreen(the message at bottom right coner tells that the program Apache HTTP Server is not working and Windows will close it):
Image
borus
 
Posts: 12
Joined: 22. March 2012 06:22
XAMPP version: 1.8.3
Operating System: Windows 8.1

Re: How to make installed xampp portable?

Postby borus » 17. December 2016 11:41

The decision is to download and unzip zip distributive of portable version and then copy all configuration files from it. And by the way - the xampp must be placed in the root of the disk
borus
 
Posts: 12
Joined: 22. March 2012 06:22
XAMPP version: 1.8.3
Operating System: Windows 8.1


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests