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)重的問題,嘗試過很多種解決方案,但是都無法解決,還請看到帖子的各位幫忙
報(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 - 多態(tài)調(diào)用方法時(shí)卻顯示bound method...2. android - viewpager問題PagerTabStrip樣式3. java如何高效讀寫10G以上大文件4. dockerfile - [docker build image失敗- npm install]5. css - input元素的time控件無法選擇6. javascript - vue-router怎么不能實(shí)現(xiàn)跳轉(zhuǎn)呢7. python 字符串匹配問題8. javascript - CSS圖片輪播顯示問題9. javascript - js判斷用戶的網(wǎng)絡(luò)能否上網(wǎng)?10. javascript - 這里的這個(gè)函數(shù)是干嘛用的?
