Typecho1.0Nginx提示accessdenied的解決辦法。
使用Nginx驅動typecho,剛安裝後可以看到首頁卻不能訪問管理登入或偽靜態頁面,找了好多方法包括修改:/usr/local/php/etc/php-fpm.conf 在後面加上一行:security.limit_extensions = .php .asmx .html .js .css .jpg .jpeg .gif .png .htm。可是頁面還不正常,按照這個blog修改了nginx配置後,問題解決。然後卻發現,輸入使用者名稱密碼後提示Access denied.提示cgi.fix_pathinfo應該為1,在/etc/php5/fpm/php.ini中修改完畢。最後,重啟php5-fpm和nginx服務,便可以正確登入管理頁面。
原文:
Finally fixed it.
The culprit was this line in my config:
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
If I commented this line, everything worked fine. However I saw this in almost every post I read about Nginx configs, so it bothered me. When looking at my configs for the millionth time, I saw that cgi.fix_pathinfo
(in php.ini
) was set to 0, where it should have been 1. The default value PHP uses is also 1, so I must have changed this in my debugging hours, because I remember reading about this value, and thought it was set correct.
Anyway, maybe it helps anyone Googling for this issue.
相關文章
- Nginx遇上AccessDenied提示解決方法Nginx
- SAP錯誤提示解決辦法
- PHP提示Notice: Undefined variable的解決辦法PHPUndefined
- phpmyadmin 提示 PHP 5.2+ is required 的解決辦法PHPUI
- Xamarin提示安裝包錯誤解決辦法
- IDEA提示failed to load JVM DLL的解決辦法IdeaAIJVM
- eclipse自動提示功能沒了的解決辦法Eclipse
- Navicat tnt版本提示“failed to save password error code”的解決辦法AIError
- 使用SVN提示“工作副本已經鎖定”的解決辦法 .
- Win7安裝錯誤提示與解決辦法Win7
- 【git】Git commit時提示錯誤時 解決辦法GitMIT
- 行動硬碟-行動硬碟提示格式化的解決辦法硬碟
- ssh 安裝及登入提示:connection refused的解決辦法
- Visual studio 2017中 Javascript無法智慧提示的解決辦法JavaScript
- OpenStack 的NAT解決辦法
- 【收藏】win7開啟word每次提示配置解決辦法Win7
- Oracle opatch apply 時提示oci.dll has active的解決辦法OracleAPP
- Win10升級之後提示系統無法啟用的解決辦法Win10
- 升級iOS12後微信不能提示新訊息的解決辦法iOS
- 提示“印表機後臺程式服務沒有執行”的解決辦法!
- 電腦提示“RPC伺服器不可用”解決辦法RPC伺服器
- Win7開機提示找到新的硬體嚮導的解決辦法Win7
- 每次開啟Word都會彈出“巨集安全”的提示的解決辦法
- SVN被鎖的解決辦法
- ORA-28056的解決辦法
- job都停了的解決辦法
- github慢解決辦法Github
- Grub Rescue解決辦法
- /dev/null解決辦法devNull
- MSBuild Tools解決辦法UI
- 新浪UC無法登入的解決辦法
- 無法訪問google picasa的解決辦法Go
- 記一次 Composer update 提示記憶體不夠的解決辦法記憶體
- idea springboot 配置檔案不自動提示的終結解決辦法IdeaSpring Boot
- 安裝office後安裝visiso後提示缺失檔案的解決辦法
- IDEA 總是提示登入github,登陸後不能push的解決辦法IdeaGithub
- CentOS安裝mysql*.rpm提示conflicts with file from package的解決辦法CentOSMySqlPackage
- linux操作提示:“Can't open file for writing”或“operation not permitted”的解決辦法LinuxMIT