A-A+

安装wamp 可以使用127.0.0.1 但是不能使用localhost

2015年02月14日 php 暂无评论 阅读 98 次

安装wamp 可以使用127.0.0.1 但是不能使用localhost的解决方法:

就是左键点击wamp程序图标弹出的菜单--->点击apache目录----->Alias directories----->http://localhost/phpmyadmin/------->编辑alias(或者edit alias),点一下它,就会用记事本打开,

原始文件内容备份为:

Alias /phpmyadmin "D:/wamp/apps/phpmyadmin3.4.10.1/"

# to give access to phpmyadmin from outside
# replace the lines
#
#        Order Deny,Allow
#    Deny from all
#    Allow from 127.0.0.1
#
# by
#
#        Order Allow,Deny
#   Allow from all
#

<Directory "D:/wamp/apps/phpmyadmin3.4.10.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>

解决方法如下将以下内容修改:

<Directory "d:/wamp/apps/phpmyadmin3.5.1/">

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1

</Directory>

把它改成

<Directory "e:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all

</Directory>

 

 

同理如果访问localhost/phpmyadmin不能访问.解决方法如下:

在wamp\alias下找到phpmyadmin.conf,备份内容如下:

Alias /phpmyadmin "D:/wamp/apps/phpmyadmin3.4.10.1/"

# to give access to phpmyadmin from outside
# replace the lines
#
#        Order Deny,Allow
#    Deny from all
#    Allow from 127.0.0.1
#
# by
#
#        Order Allow,Deny
#   Allow from all
#

<Directory "D:/wamp/apps/phpmyadmin3.4.10.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>

修改方法:

<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>

改为:

<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>

标签:

给我留言

Copyright © web前端技术开发个人博客 保留所有权利  京ICP备14060653号 Theme  Ality

用户登录