linux - 【已解決】fabric部署的Python項目Apache啟動之后提示403Forbidden該如何解決?
問題描述
現在這個公司暫時承接一個Python的項目,接手的時候是另外一個伙伴接的部署相關的問題,但是現在他那邊也記不住當時怎么成功的,我這邊就開始一步一個坑的來部署了,現在就遇到很嚴重的問題,嘗試過很多種解決方案,但是都無法解決,還請看到帖子的各位幫忙
報錯信息
Forbidden You don’t have permission to access / on this server.
軟件版本Apache版本 Apache/2.4.6Python版本 Python 2.7.5
報錯描述使用fabric部署之后,已經看到啟動起來了apache,但是訪問IP的時候就是提示403 Forbidden
關鍵部分代碼
httpd.conf 文件,這里就上了關鍵信息,其他的信息都是通用并沒有修改過 ServerRoot '/etc/httpd'Listen 80Include conf.modules.d/*.confUser apacheGroup apacheServerAdmin root@localhost<Directory />
Options AllAllowOverride all
</Directory>DocumentRoot '/var/www/html'
已經嘗試過
1、修改項目路徑的apache所有者 或者 root所有者 2、修改httpd 中的apache所有者
問題解答
回答1:已經解決了,解決方案如下我遇到的問題最終查到是由于linux 系統的 selinux 配置問題。參考鏈接:http://bguncle.blog.51cto.com...
回答2:是不是少了allow from all?
<Directory '/var/www/html'> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all</Directory>
相關文章:
1. macos - mac下docker如何設置代理2. java - 請問在main方法中寫成對象名.屬性()并賦值,與直接參參數賦值輸錯誤是什么原因?3. MySQL數據庫中文亂碼的原因4. 關docker hub上有些鏡像的tag被標記““This image has vulnerabilities””5. docker不顯示端口映射呢?6. docker - 各位電腦上有多少個容器???容器一多,自己都搞混了,咋辦呢?7. android studio總是在processes running好久8. angular.js - 關于$apply()9. docker-compose 為何找不到配置文件?10. dockerfile - 我用docker build的時候出現下邊問題 麻煩幫我看一下
