这很可能是一个初学者的问题,但我似乎无法find任何地方的修复,我发现处理它的几个post是没有答案的(例如,窗口7中的xampp无法访问C:/ xampp / htdocs内的子文件夹中的文件 ) 。
到目前为止,我有一个工作本地主机使用XAMPP(不得不改变端口为8080),位于一个自定义的文档根。 我可以加载index.html,但是当我点击一个subdirectoy的链接时:
<li><a href="examples/test.html"></a></li>
我得到以下错误:
暂停服务!
- Eclipse – 如何重命名项目文件夹(在文件系统上)
- input“help(”modules“)”时,Spyder在Windows上崩溃
- 如何做一个健康检查的Windows启动应用程序运行在Windows Docker Windows容器与Ansible?
- UWP:如何调用WinAPI方法
- 如何修复错误:在Windows 10上产生UNKNOWN和node.js v7.8.0?
由于维护停机或容量问题,服务器暂时无法处理您的请求。 请稍后再试。
如果您认为这是服务器错误,请与网站站长联系。
错误503
localhost Apache / 2.4.25(Win32)OpenSSL / 1.0.2j PHP / 5.6.30
即使我直接在浏览器中input地址( http:// localhost:8080 / examples / test.html ),也是行不通的。
有人可以指出这是否应该工作? 或者,如果我应该指定的东西在Apacheconfiguration文件?
我还可以注意到,当浏览器(在本地主机之外)浏览html文件时,页面无论在目录中的位置如何都可以正常工作。 谢谢你的帮助!
编辑:这里是我修改后的conf文件DocumentRoot部分:
#DocumentRoot "F:/Apps/xampp/htdocs" DocumentRoot "F:/me/GitWorkDir/myproject_io" <Directory "F:/me/GitWorkDir/myproject_io"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks Includes ExecCGI # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Require all granted </Directory>
大多数情况下,如果你在Windows上安装XAMPP,它运行没有任何问题。 只有在Windows发出的东西是许可。 您可以通过右键单击htdocs文件夹并转到安全选项卡并将所有权限授予每个人来解决。
事实证明,这个问题是由于一个不幸的巧合,防止子目录被称为,正是“例子”…看到这个页面讨论这个问题,并提出了一个修复。
总之,你可以: