linux - 【已解決】fabric部署的Python項(xiàng)目Apache啟動之后提示403Forbidden該如何解決?
問題描述
現(xiàn)在這個公司暫時(shí)承接一個Python的項(xiàng)目,接手的時(shí)候是另外一個伙伴接的部署相關(guān)的問題,但是現(xiàn)在他那邊也記不住當(dāng)時(shí)怎么成功的,我這邊就開始一步一個坑的來部署了,現(xiàn)在就遇到很嚴(yán)重的問題,嘗試過很多種解決方案,但是都無法解決,還請看到帖子的各位幫忙
報(bào)錯信息
Forbidden You don’t have permission to access / on this server.
軟件版本Apache版本 Apache/2.4.6Python版本 Python 2.7.5
報(bào)錯描述使用fabric部署之后,已經(jī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. boot2docker無法啟動2. node.js - antdesign怎么集合react-redux對input控件進(jìn)行初始化賦值3. 關(guān)于docker下的nginx壓力測試4. MySQL客戶端吃掉了SQL注解?5. javascript - 在低版本微信如何處理引用高版本的微信小程序基礎(chǔ)庫所帶來的問題?6. node.js mysql Cannot find module "net" 和 "tls"和"fs" 的問題7. mysql 一條語句多種count如何寫8. python from fileutils import FileUtils文件操作9. python2.7 - Python安裝模組不成功10. mysql - InnoDB中的鎖

網(wǎng)公網(wǎng)安備