简体   繁体   English

XAMPP为除phpmyadmin之外的所有内容提供了禁止的403

[英]XAMPP gives Forbidden 403 for everything but phpmyadmin

Long story short: I installed Windows 7 on my laptop everything is fine with OS. 长话短说:我在笔记本电脑上安装了Windows 7,在OS上一切正常。 I installed latest xampp. 我安装了最新的xampp。 What i did next via help of google and stackoverflow: 接下来我通过谷歌和stackoverflow的帮助:

system32/drivers/etc/hosts system32 /驱动程序/ etc /主机

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
    127.0.0.1       localhost
    ::1             localhost
    127.0.0.1   local.projects

httpd-xampp.conf (allow from all is commented couse it totally had no effect at all). httpd-xampp.conf(允许注释,因为它完全没有任何作用)。

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    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
    #Allow from all
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

And the main couse for the 403 being retrieved everywhere is i think THIS in httpd-vhosts.conf 我想在httpd-vhosts.conf中找到403的主要原因是

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot "D:/Web-Pages"
    ServerName local.projects
    ServerAlias local.projects
    ErrorLog "logs/local.projects.log"
    CustomLog "logs/local.projects.log" combined
    <directory "D:/Web-Pages">
        AllowOverride All
        Allow from all
        Require all granted
    </directory>
</VirtualHost>

If there is anyhow you can point me to the right direction i would be very glad! 如果可以的话,您可以为我指明正确的方向,我将非常高兴! More info: 更多信息:

When i type in addressbar this "local.projects" or this "localhost" I get 403 like that: 当我在地址栏中键入“ local.projects”或“ localhost”时,我得到的是403:


Access forbidden! 禁止访问!

You don't have permission to access the requested directory. 您无权访问所请求的目录。 There is either no index document or the directory is read-protected. 没有索引文档,或者目录受到了读保护。

If you think this is a server error, please contact the webmaster. 如果您认为这是服务器错误,请与网站管理员联系。

Error 403 错误403

localhost Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 本地主机Apache / 2.4.7(Win32)OpenSSL / 1.0.1e PHP / 5.5.6


Okay, but when i access phpmyadmin at "localhost/phpmyadmin" everything works fine. 好的,但是当我在“ localhost / phpmyadmin”中访问phpmyadmin时,一切正常。 When i add pressmission to the folders via Windows- nothing changes. 当我通过Windows向文件夹添加pressmission时,没有任何变化。 Suggest any ideas how to get rid of these 403's please? 请提出任何想法如何摆脱这些403吗?

Do you have any pages in D:/Web-Pages directory? D:/ Web-Pages目录中是否有任何页面? If this directory has no index page then it will show you 403 error. 如果该目录没有索引页,那么它将显示403错误。

If you have any page like, index.htm then try to browse http://localhost/index.htm . 如果您有类似index.htm的页面,然后尝试浏览http://localhost/index.htm

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM