简体   繁体   English

WAMP服务器错误“禁止访问您无权访问此服务器上的/ phpmyadmin /。”

[英]WAMP Server ERROR “Forbidden You don't have permission to access /phpmyadmin/ on this server.”

Hi Friends previously I am using XAMP Server but when I install joomla Templates it creates alots of error. 嗨朋友以前我使用XAMP服务器,但当我安装joomla模板时,它会产生很多错误。 Now I installed the WAMP, but the issues are: 1. I can access with 127.0.0.1, but I cant access with "localhost". 现在我安装了WAMP,但问题是:1。我可以使用127.0.0.1访问,但我无法访问“localhost”。 2 When i access phpmyadmin i get this error. 2当我访问phpmyadmin时,我收到此错误。

Forbidden You don't have permission to access /phpmyadmin/ on this server. 禁止您无权访问此服务器上的/ phpmyadmin /。

 Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.4.5/" 

# 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
#

After changing, it will look like this 更改后,它将如下所示

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

After this just restart Wamp 在此之后重新启动Wamp

Go to C:\\wamp\\alias . 转到C:\\wamp\\alias Open the file phpmyadmin.conf and change 打开文件phpmyadmin.conf并进行更改

<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>

to

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

problem solved 问题解决了

Change httpd.conf file as follows: 更改httpd.conf文件如下:

from

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

to

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

So none of the above stuff worked for me. 所以上面的东西都不适合我。 Except this: edit httpd.conf, 除此之外:编辑httpd.conf,

find the line 找到这条线

Listen 80 

and change to 并改为

listen 0.0.0.0:80 

if you are running windows 8, its got something to do with using ipv6 instead of ipv4 如果你正在运行Windows 8,它与使用ipv6而不是ipv4有关

Go to C:\\wamp\\alias. 转到C:\\ wamp \\ alias。 Open the file phpmyadmin.conf and add 打开文件phpmyadmin.conf并添加

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

Change in following file \\bin\\apache\\apache2.2.22\\conf\\httpd.conf 更改以下文件\\ bin \\ apache \\ apache2.2.22 \\ conf \\ httpd.conf

Replace Listen 80 with Listen 0.0.0.0:80

Replace 更换

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

with

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

Replace 更换

onlineoffline tag - don't remove onlineoffline标签 - 不要删除

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

with

onlineoffline tag - don't remove onlineoffline标签 - 不要删除

Order Deny,Allow
Allow from all
Allow from 127.0.0.1

in \\wamp\\alias\\phpmyadmin.conf replace 在\\ wamp \\ alias \\ phpmyadmin.conf中替换

<Directory "c:/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>

with

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

Tested on windows localhost. 在windows localhost上测试过。 Note : Please consider RigsFolly's comment also. 注意:请同时考虑RigsFolly的评论。

For WampServer 2.2 with Apache 2.4.2 I ended up with: 对于使用Apache 2.4.2的WampServer 2.2,我最终得到:

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local

To solve this, I opened httpd.conf and changed the following line: 为了解决这个问题,我打开了httpd.conf并更改了以下行:

Allow from 127.0.0.1

to: 至:

Allow from 127.0.0.1 ::1

I faced this problem 我遇到了这个问题

Forbidden You don't have permission to access /phpmyadmin/ on this server

Some help about this: 一些帮助:

First check you installed a fresh wamp or replace the existing one. 首先检查您是否安装了新的wamp或更换现有的wamp。 If it's fresh there is no problem, For done existing installation. 如果它是新的没有问题,对于完成现有的安装。

Follow these steps. 跟着这些步骤。

  1. Open your wamp\\bin\\mysql directory 打开你的wamp \\ bin \\ mysql目录
  2. Check if in this folder there is another folder of mysql with different name, if exists delete it. 检查在这个文件夹中是否有另一个具有不同名称的mysql文件夹,如果存在则将其删除。
  3. enter to remain mysql folder and delete files with duplication. 输入以保留mysql文件夹并删除带有重复的文件。
  4. start your wamp server again. 再次启动你的wamp服务器。 Wamp will be working. Wamp将会工作。

just add following line in wamp/alias/phpmyadmin.conf 只需在wamp / alias / phpmyadmin.conf中添加以下行
Allow from ::1 允许来自:: 1

so it will look something like this depending your phpmyadmin version. 所以它会看起来像这样取决于你的phpmyadmin版本。

<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
Allow from ::1
</Directory> 

If its possible uninstall wamp then run installation as administrator then change you mysql.conf file like that 如果它可能卸载wamp然后以管理员身份运行安装,那么改变你的mysql.conf文件

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

Not: Before I reinstall as admin the solution above didn't work for me 不是:在我作为管理员重新安装之前,上面的解决方案对我不起作用

Change the file content of c:\\wamp\\alias\\phpmyadmin.conf to the following. c:\\wamp\\alias\\phpmyadmin.conf的文件内容更改为以下内容。

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

Here my WAMP installation is in the c:\\wamp folder. 这里我的WAMP安装位于c:\\ wamp文件夹中。 Change it according to your installation. 根据您的安装进行更改。

Previously, it was like this: 以前,它是这样的:

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

Restart your Apache server after making these changes. 进行这些更改后重新启动Apache服务器。

In your apache config file (../bin/apachex.yz/cong/httpd.conf) 在你的apache配置文件中(../bin/apachex.yz/cong/httpd.conf)

Just change 只是改变

< Directory "c:/wamp/www/" > ... <目录“c:/ wamp / www /”> ...
... ...

"Require local" ===> "Require all granted" “需要本地”===>“要求全部授予”
< /Directory > </ Directory>

This allows other pc's to access (to read) your web folder. 这允许其他PC访问(读取)您的Web文件夹。

I had done below changes for new phpmyadmin4.0.4 in httpd.conf file 我在httpd.conf文件中对新的phpmyadmin4.0.4进行了以下更改

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

and phpmyadmin.conf phpmyadmin.conf

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

and restart my server. 并重启我的服务器。

None of the above answers worked for me, or where unsafe (as some pointed out, using Allow from all can make your files and data accessible to the outside world). 上述答案都不适用于我,或者不安全的地方(正如一些人指出的那样,使用Allow from all可以使您的文件和数据对外界可访问)。

Open the c:\\wamp\\alias\\phpmyadmin.conf file and change 打开c:\\wamp\\alias\\phpmyadmin.conf文件并进行更改

Allow from 127.0.0.1

to

Allow from 127.0.0.1  ::1

Explanation: 说明:

  • On most computer systems, localhost resolves to the IP address 127.0.0.1, which is the most commonly used IPv4 loopback address, and to the IPv6 loopback address ::1 (source: https://en.wikipedia.org/wiki/Localhost ) 在大多数计算机系统上,localhost解析为IP地址127.0.0.1(最常用的IPv4环回地址) 和IPv6环回地址:: 1 (源: https//en.wikipedia.org/wiki/Localhost)
  • The resolution of the name localhost into one or more IP addresses is configured by the following lines in the operating system's hosts file: 将localhost名称解析为一个或多个IP地址由操作系统的hosts文件中的以下行配置:

     127.0.0.1 localhost ::1 localhost 
  • to see your hosts file, go to c:\\Windows\\System32\\drivers\\etc\\HOSTS 要查看您的主机文件,请转到c:\\Windows\\System32\\drivers\\etc\\HOSTS

  • notice the above lines are commented out with the note: # localhost name resolution is handled within DNS itself. 注意上面的行用注释注释掉: # localhost name resolution is handled within DNS itself.

On my machine, on Win7, I also noticed the following: 在我的机器上,在Win7上,我也注意到以下内容:

  • localhost\\phpmyadmin did not work on Chrome, but worked on IE11 localhost\\phpmyadmin无法在Chrome上运行,但在IE11上运行
  • 127.0.0.1\\phpmyadmin worked on Chrome 127.0.0.1\\phpmyadmin在Chrome上工作

comment Require local from httpd.conf 注释需要来自httpd.conf的本地

"#Require local" “#Require local”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WAMP-禁止-您无权访问此服务器上的/ - WAMP - Forbidden - You don't have permission to access / on this server 禁止访问:您没有权限访问此服务器上的/phpmyadmin - Forbidden :You don't have permission to access /phpmyadmin on this server 403 Forbidden您无权访问此服务器上的/ mytesting / &lt;。 错误 - 403 Forbidden You don't have permission to access /mytesting/< on this server. ERROR WAMP“您无权访问此服务器上的/ Health_1st /&gt;。” - WAMP “You don't have permission to access /Health_1st/> on this server.” 迁移和错误:禁止您无权访问此服务器上的/ - Migration and Error: Forbidden You don't have permission to access / on this server 禁止Wordpress 403“您无权访问此服务器上的/。” - Wordpress 403 Forbidden “You don't have permission to access / on this server.” Forbidden 您无权访问此服务器上的 /。 服务器无法读取 htaccess 文件,拒绝访问是安全的 - Forbidden You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe 如何解决“禁止您没有访问此服务器上的/ phpmyadmin /的权限”? - How to resolve “Forbidden You don't have permission to access /phpmyadmin/ on this server”? 如何在64位WAMP 3上修复“您无权访问此服务器上的/index.php。” - How to fix “You don't have permission to access /index.php on this server.” on 64bit WAMP 3 WAMP您无权访问此服务器上的/ - WAMP You don't have permission to access / on this server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM