Home  >  Q&A  >  body text

linux - 【已解决】fabric部署的Python项目Apache启动之后提示403Forbidden该如何解决?

现在这个公司暂时承接一个Python的项目,接手的时候是另外一个伙伴接的部署相关的问题,但是现在他那边也记不住当时怎么成功的,我这边就开始一步一个坑的来部署了,现在就遇到很严重的问题,尝试过很多种解决方案,但是都无法解决,还请看到帖子的各位帮忙

报错信息

Forbidden You don't have permission to access / on this server.

软件版本
Apache版本 Apache/2.4.6
Python版本 Python 2.7.5

报错描述
使用fabric部署之后,已经看到启动起来了apache,但是访问IP的时候就是提示403 Forbidden

关键部分代码

httpd.conf 文件,这里就上了关键信息,其他的信息都是通用并没有修改过
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />

Options All
AllowOverride all

</Directory>
DocumentRoot "/var/www/html"

已经尝试过

   1、修改项目路径的apache所有者 或者 root所有者
   2、修改httpd 中的apache所有者
怪我咯怪我咯2711 days ago448

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:31:54

    It has been solved, the solution is as follows
    The problem I encountered was finally found to be due to the selinux configuration problem of the Linux system.
    Reference link: http://bguncle.blog.51cto.com...

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 10:31:54

    Is it missing allow from all?

    <Directory "/var/www/html">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    reply
    0
  • Cancelreply