在配置网站的自定义文件夹(Apache)困难

发布于 2025-02-04 23:14:53 字数 977 浏览 4 评论 0原文

我正在尝试在Fedora上配置HTTPD,但是我为期两天的努力使我一无所获。 我安装了HTTPD和PHP,添加了该站点的配置文件,一切都很好。我尝试加载它,并看到“访问被拒绝”。但是我已经授予Apache用户和Apache Group 755权利(沿着路径的每个文件夹)。

Apache日志中的错误:

[6月6日20:25:18.088420 2022] [谈判:错误] [PID 12656:TID 12758](13)允许拒绝:[客户127.0.0.1:45920] AH00686:不能 读取多:/home/concasse_master/desktop/sample/public/public/p>的目录

[6月6日20:25:18.089421 2022] [Proxy_fcgi:错误] [PID 12656:TID 12758] [客户端127.0.0.1:45920] AH01071:错误'无法打开 主脚本:/home/concasse_master/desktop/sample/public/index.php (拒绝许可)'

localhost.conf:

<VirtualHost *:8080>
    ServerName localhost
    DocumentRoot /home/concasse_master/Desktop/sample/public
    ErrorLog logs/error.log
    CustomLog logs/access.log combined
    <Directory /home/concasse_master/Desktop/sample/public/>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Require all granted
    </Directory>
</VirtualHost>

I'm trying to configure httpd on fedora, but my two day effort has gotten me nowhere.
I installed httpd and php, added the configuration file for the site, everything is fine. I try to load it and see "access denied." but I have already granted to the apache user and apache group 755 rights (on every folder along the path).

Errors in apache log:

[Mon Jun 06 20:25:18.088420 2022] [negotiation:error] [pid 12656:tid
12758] (13)Permission denied: [client 127.0.0.1:45920] AH00686: cannot
read directory for multi: /home/concasse_master/Desktop/sample/public/

[Mon Jun 06 20:25:18.089421 2022] [proxy_fcgi:error] [pid 12656:tid
12758] [client 127.0.0.1:45920] AH01071: Got error 'Unable to open
primary script: /home/concasse_master/Desktop/sample/public/index.php
(Permission denied)'

localhost.conf:

<VirtualHost *:8080>
    ServerName localhost
    DocumentRoot /home/concasse_master/Desktop/sample/public
    ErrorLog logs/error.log
    CustomLog logs/access.log combined
    <Directory /home/concasse_master/Desktop/sample/public/>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Require all granted
    </Directory>
</VirtualHost>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文