Xampp PHPMYADMIN Security,

Brennen

hippopotomonstrosesquipedaliophobia
Nov 6, 2011
291
36
Is there a way I can allow access to PHPMYADMIN to only certain IPs? So like localhost then say my 1 friends ip?
 

MarMigs

I rock :D
Dec 3, 2010
115
14
what about checking xampp documentation?

EDIT--


XAMPP New concept of security:
The access to the selected object is only possible trough the local network
This configuration can be changed on the file "httpd-xampp.conf".
 

Brennen

hippopotomonstrosesquipedaliophobia
Nov 6, 2011
291
36
No I mean like, right now if I go to it says acess denied, I want to make it so its not denied, but only for my 1 friend?
 

MarMigs

I rock :D
Dec 3, 2010
115
14
Just a minute I'm getting you a small tutorial

EDIT--

Go to C:\xampp or the directory of it.

apache -> conf -> extra

Edit httpd-xampp.conf and on the bottom of the file you will see

<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

After
Code:
Allow from ::1 127.0.0.1/8

Put
Code:
Allow from ::1 xxx.xxx.xxx.xxx
Allow from ::1 yyy.yyy.yyy.yyy
(replace xxx by the ip of you and yyy by the ip of your friend)
 

iAmRyan

Member
Aug 23, 2011
289
45
Click started, and search:
httpd-xampp.conf
The scroll to the very end, and where it has 127.0.0.1, and your friends IP under it, I think, not too sure though.
 

Cablink

http://www.vroleplay.net - join now!
Feb 4, 2011
382
27
Ok open up your xampp folder then go to apache then conf then extra then open up httpd-xampp.conf then replace it with this:
Code:
#
# 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"
    UnsetEnv PERL5LIB
</IfModule>
 
#
# PHP-Module setup
#
LoadFile "C:/xampp/php/php5ts.dll"
LoadModule php5_module modules/php5apache2_2.dll
 
<IfModule php5_module>
    <FilesMatch "\.php$">
        SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
    </FilesMatch>
 
    PHPINIDir "C:/xampp/php"
</IfModule>
 
#
# PHP-CGI setup
#
<IfModule !php5_module>
    <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>
 
 
<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|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Allow from all
    Allow from All
 
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
Ok once you have done that save it and reboot apache and your done!

If i helped please press the thanks buttonhttp://forum.*****.com/images/smilies/thumbup.gif
______________
Thanks to from *****, for the tutorial! Edit: IF this doesnt work, download Xampp 1.7.1 and it will work!
 

Users who are viewing this thread

Top