【问题标题】:Apache2 only shows index, but know other sidesApache2只显示索引,但知道其他方面
【发布时间】:2013-03-14 13:43:58
【问题描述】:

我的 Apache2 配置需要帮助,其他线程对我不起作用 :( 我在 Debian 的树莓派上得到了喘息。 我已经安装了 Apache2 PHP 和 MySQL,如 How-To 中所示。 它工作正常,index.php 可以在我的服务器上工作,php 代码一切正常。 但是,如果我添加第二个站点或添加 css\file.css,我会在 error.log 中收到以下消息:

[Thu Mar 14 14:15:55 2013] [error] [client 212.184.119.18] (13)Permission denied                         : file permissions deny server access: /var/www/style.html
[Thu Mar 14 14:15:57 2013] [error] [client 212.184.119.18] (13)Permission denied                         : access to /css/coolblue.css denied, referer: http://myNAME.dyndns-at-home.com/

我不知道如何修复这个权限,请给我提示。

如果您需要更多信息,请告诉我,我会给您;-) 对不起,我的英语不好。 问候

【问题讨论】:

    标签: configuration apache2 debian


    【解决方案1】:

    您应该检查新站点所在目录的权限或您创建的文件的权限。 这些文件和目录必须是 Apache 服务器的用户或组可读的。

    例如: 列出文件或目录:

    ls -la
    

    设置所需的目录权限

    chmod 750 site_directory
    chown webeditoruser:apachegroup site_directory
    

    为文件设置所需的权限

    chmod 640 your_file.ext
    chown webeditoruser:apachegroup your_file.ext
    

    【讨论】:

    • 是的,谢谢你现在它工作了我不知道这很容易谢谢你;-)
    猜你喜欢
    • 2015-04-09
    • 2018-01-12
    • 2021-11-05
    • 1970-01-01
    • 2020-11-30
    • 2022-11-10
    • 1970-01-01
    • 2013-10-28
    • 2017-03-26
    相关资源
    最近更新 更多