长话短说:我在笔记本电脑上安装了Windows 7,操作系统一切正常。我安装了最新的xampp。我通过谷歌和stackoverflow的帮助下一步做了什么:
SYSTEM32 /驱动器/ etc / hosts中
# 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(允许所有人评论说完全没有效果)。
#
# 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>
到处检索403的主要方法是我认为这是在httpd-vhosts.conf
<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>
如果无论如何你可以指出我正确的方向我会很高兴! 更多信息:
当我输入地址栏时,这个“local.projects”或这个“localhost”我得到403就是这样:
禁止访问!
您无权访问所请求的目录。没有索引文档或目录是读保护的。
如果您认为这是服务器错误,请与网站管理员联系。
错误403
本地主机 Apache / 2.4.7(Win32)OpenSSL / 1.0.1e PHP / 5.5.6
好的,但是当我在“localhost / phpmyadmin”访问phpmyadmin时,一切正常。当我通过Windows向文件夹添加压力时 - 没有任何变化。建议如何摆脱这些403的想法?
答案 0 :(得分:0)
D:/ Web-Pages目录中是否有任何页面?如果此目录没有索引页面,那么它将显示403错误。
如果您有任何类似index.htm的页面,请尝试浏览http://localhost/index.htm
。