Remote Phpmyadmin access.

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

Remote Phpmyadmin access.

Postby Kaboo » 13. October 2009 17:08

Hi, i installed xampp in a remote server, and i want to access with my local machine,
but when i type xxx.x.xxx.xxx/phpmyadmin i get the following error:
XAMPP new security concept:
You can only access this page by the local machine.
This configuration can be changed in the file "httpd-xampp.conf".

I tried to modify the file "httpd-xampp.conf", but i'm not the best programmer/web master :roll:.
Can someone help me to access it remotely? Here is the file "httpd-xampp.conf":
#
# XAMPP settings
#

<IfModule env_module>
SetEnv MIBDIRS "C:/xampp/php/extras/mibs"
SetEnv MYSQL_HOME "C:\\xampp\\mysql\\bin"
SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "C:\\xampp\\php"
SetEnv PHPRC "C:\\xampp\\php"
SetEnv TMP "C:\\xampp\\tmp"
</IfModule>

#
# PHP-Module setup
#
LoadFile "C:/xampp/php/php5ts.dll"
LoadModule php5_module modules/php5apache2_2.dll

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

#
# 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 php5_module>
PHPINIDir "C:/xampp/php"
</IfModule>

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

ScriptAlias /php-cgi/ "C:/xampp/php/"
<Directory "C:/xampp/php">
AllowOverride None
Options None
Order deny,allow
Deny from all
<Files "php-cgi.exe">
Allow from all
</Files>
</Directory>

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

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

<IfModule alias_module>
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>
AllowOverride AuthConfig
</Directory>

Alias /licenses "C:/xampp/licenses/"
<Directory "C:/xampp/licenses">
Options +Indexes
<IfModule autoindex_color_module>
DirectoryIndexTextColor "#000000"
DirectoryIndexBGColor "#f8e8a0"
DirectoryIndexLinkColor "#bb3902"
DirectoryIndexVLinkColor "#bb3902"
DirectoryIndexALinkColor "#bb3902"
</IfModule>
</Directory>

Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
</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
</Directory>
</IfModule>

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|phpmyadmin|licenses|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
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>


Any tips/suggestions would be welcome!
Thanks!!
Kaboo
 
Posts: 13
Joined: 13. October 2009 16:57

Re: Remote Phpmyadmin access.

Postby denebgarza » 13. October 2009 17:38

Code: Select all
<LocationMatch "^/(?i:(?:xampp|security|phpmyadmin|licenses|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16


change to

Code: Select all
<LocationMatch "^/(?i:(?:xampp|security|phpmyadmin|licenses|webalizer|server-status|server-info))">
Order deny,allow
#Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16


You should now be able to access Phpmyadmin from remotely too (set a password for it, or else it's a BIG security hole :P)
denebgarza
 
Posts: 4
Joined: 13. October 2009 17:20

Re: Remote Phpmyadmin access.

Postby Kaboo » 13. October 2009 18:25

It didn't work, but it was because i forgot to restart xampp :lol: .
I restarted it and it works fine!

Thanks, denebgarza!!

But, is there no problem on maintaining the pages xampp, security, phpmyadmin, licenses, webalizer, server-status, server-info open?

Thanks.
Kaboo
 
Posts: 13
Joined: 13. October 2009 16:57

Remote Phpmyadmin access.

Postby lemoineo » 14. October 2009 10:05

Is not possible to open the security only on the alias phpmyadmin
whith protection on the directory like that ?
Code: Select all
<Directory "/Documents and Settings/All Users/Documents/xampp/phpMyAdmin">
      AllowOverride All
      Order allow,deny
      Allow from all
</Directory>

it is not interest to unsecure server after the work of team Xampp !!

Bye ...
lemoineo
 
Posts: 19
Joined: 07. February 2005 18:27


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 36 guests