XAMPP符号链接访问被禁止
对于xampp服务器,我创建了一个符号链接 现在,在运行服务器时,我发现一个错误:XAMPP符号链接访问被禁止,xampp,symlink,Xampp,Symlink,对于xampp服务器,我创建了一个符号链接 现在,在运行服务器时,我发现一个错误: Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. If you think this is a server error, please contact the webmaster. Erro
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.7 (Unix) OpenSSL/1.0.1e PHP/5.5.6 mod_perl/2.0.8-dev Perl/v5.16.3
在项目目录中,我目前只有一个index.html
文件,其中包含:
<!DOCTYPE html>
<html>
<body>
<p>test</p>
</body>
</html>
试验
我已检查了项目目录和符号链接所在目录的所有权限。这些都设置为777
要使其正常工作,我可以做些什么?您需要做的是在apache配置中创建虚拟主机。 我建议在大多数基于unix的系统上使用不带xampp的纯apache,但使用xampp仍然是可能的 找到您的apache配置目录并转到额外文件夹,它应该用如下内容组织:
\xampp\apache\conf\extra\
在文件底部添加侦听器和虚拟主机,如下所示
ServerName localhost
Listen 8080
<VirtualHost *:8080>
DocumentRoot "diretory/with/index/"
<Directory "directory/with/all/files">
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
ServerName本地主机
听8080
DocumentRoot“diretory/with/index/”
要求所有授权
允许超越所有
DocumentRoot和Directory之间的主要区别在于DocumentRoot必须直接指向index.php所在的位置。
目录只是指向所有资源位置
例如,您可以有
stuff/public
文件夹,其中包含用户可以访问的所有内容,但您也有一些类似于laravel的框架,它位于目录的上方,仍然需要由php解释器进行维护,但最终用户不应该直接访问它我知道这个问题有点老了,但我最近诚实地面对了这个问题,没有任何外部帮助和头脑风暴,我永远无法解决这个问题,所以我希望它能让别人的生活更轻松