问题
I have access wamp localhost from another pc but
when accessing phpmyadmin from this pc
i can't access like following figure
回答1:
On WAMPServer the phpMyAdmin tool is configure so that it cannot be used from any ip other than the one running WAMPServer. Well to be precise the alias is configured so it can only be accessed from the machine running Apache.
This is of course a security measure, to protect beginners from accidentally giving away the crown jewels.
If you want to allow access to phpMyAdmin from other locations such as your lan then you have to amend the phpMyAdmin's alias configuration. You do this by editing the
\wamp\alias\phpmyadmin.conf
file and adding instructions to tell apache that it is allowed to let more ip addresses connect to this alias.
Alias /phpmyadmin "d:/wamp/apps/phpmyadmin4.1.14/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#
<Directory "d:/wamp/apps/phpmyadmin4.1.14/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
Require ip 192.168.10 <-- add this line
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
Allow from 192.168.10 <-- add this line
</IfDefine>
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
Or you can specify specific ip addresses by doing
Require ip 192.168.2.100 192.168.2.101 192.168.2.102
Require ip 192.168.2.103 192.168.2.104 192.168.2.105
回答2:
Alias /phpmyadmin "D:/wamp/apps/phpmyadmin4.6.4/"
<Directory "D:/wamp/apps/phpmyadmin4.6.4/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<ifDefine APACHE24>
# Require local
Require all granted (changes)
</ifDefine>
<ifDefine !APACHE24>
Order Deny,Allow
#Deny from all
Allow from all
# Allow from localhost ::1 127.0.0.1
**Allow from localhost ::0 0.0.0.0** (changes)
</ifDefine>
# To import big file you can increase values
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
回答3:
Change to Require all granted
<Directory "c:/wamp64/apps/phpmyadmin4.8.5/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride all
<ifDefine APACHE24>
Require all granted
</ifDefine>
<ifDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</ifDefine>
# To import big file you can increase values
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
来源:https://stackoverflow.com/questions/28711717/accessing-wamp-2-5-phpmyadmin-from-another-pc-in-a-lan-network