linux - 【已解決】fabric部署的Python項(xiàng)目Apache啟動之后提示403Forbidden該如何解決?
問題描述
現(xiàn)在這個公司暫時承接一個Python的項(xiàng)目,接手的時候是另外一個伙伴接的部署相關(guān)的問題,但是現(xiàn)在他那邊也記不住當(dāng)時怎么成功的,我這邊就開始一步一個坑的來部署了,現(xiàn)在就遇到很嚴(yán)重的問題,嘗試過很多種解決方案,但是都無法解決,還請看到帖子的各位幫忙
報錯信息
Forbidden You don’t have permission to access / on this server.
軟件版本Apache版本 Apache/2.4.6Python版本 Python 2.7.5
報錯描述使用fabric部署之后,已經(jīng)看到啟動起來了apache,但是訪問IP的時候就是提示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. javascript - webpack 報錯 新人 求解2. nginx 80端口反向代理多個域名,怎樣隱藏端口的?3. angular.js - 關(guān)于ng-model和ng-bind的疑問4. node.js - 跑antd的的模板例子!想修改端口,怎么修改呢!!(里面好像用了什么dora插件!!!)5. windows-7 - Wamp集成環(huán)境Apache無法啟動6. android - NavigationView 的側(cè)滑菜單中如何保存新增項(xiàng)(通過程序添加)7. angular.js - angular做點(diǎn)擊購買時的遮罩層8. 關(guān)于thinkphp 5.1中,ajax提交數(shù)據(jù)url的格式寫法,加花括號就出錯,請老師指點(diǎn)9. 有大佬知道這種接口文件怎么使用嗎?10. tp5 不同控制器中的變量調(diào)用問題
