linux - 【已解決】fabric部署的Python項(xiàng)目Apache啟動(dòng)之后提示403Forbidden該如何解決?
問題描述
現(xiàn)在這個(gè)公司暫時(shí)承接一個(gè)Python的項(xiàng)目,接手的時(shí)候是另外一個(gè)伙伴接的部署相關(guān)的問題,但是現(xiàn)在他那邊也記不住當(dāng)時(shí)怎么成功的,我這邊就開始一步一個(gè)坑的來部署了,現(xiàn)在就遇到很嚴(yán)重的問題,嘗試過很多種解決方案,但是都無法解決,還請(qǐng)看到帖子的各位幫忙
報(bào)錯(cuò)信息
Forbidden You don’t have permission to access / on this server.
軟件版本Apache版本 Apache/2.4.6Python版本 Python 2.7.5
報(bào)錯(cuò)描述使用fabric部署之后,已經(jīng)看到啟動(dòng)起來了apache,但是訪問IP的時(shí)候就是提示403 Forbidden
關(guān)鍵部分代碼
httpd.conf 文件,這里就上了關(guān)鍵信息,其他的信息都是通用并沒有修改過 ServerRoot '/etc/httpd'Listen 80Include conf.modules.d/*.confUser apacheGroup apacheServerAdmin root@localhost<Directory />
Options AllAllowOverride all
</Directory>DocumentRoot '/var/www/html'
已經(jīng)嘗試過
1、修改項(xiàng)目路徑的apache所有者 或者 root所有者 2、修改httpd 中的apache所有者
問題解答
回答1:已經(jīng)解決了,解決方案如下我遇到的問題最終查到是由于linux 系統(tǒng)的 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>
相關(guān)文章:
1. python 利用subprocess庫調(diào)用mplayer時(shí)發(fā)生錯(cuò)誤2. python文檔怎么查看?3. python - Pycharm的Debug用不了4. javascript - 關(guān)于apply()與call()的問題5. datetime - Python如何獲取當(dāng)前時(shí)間6. javascript - nginx反向代理靜態(tài)資源403錯(cuò)誤?7. html - eclipse 標(biāo)簽錯(cuò)誤8. 請(qǐng)問PHPstudy中的數(shù)據(jù)庫如何創(chuàng)建索引9. 安全性測(cè)試 - nodejs中如何防m(xù)ySQL注入10. python - pycharm 自動(dòng)刪除行尾空格
