Tommy 碎碎念

Tommy Wu's blog

« 上一篇 | 下一篇 »

Gallery Remote 在使用 nginx 時無法登入的問題
post by tommy @ 14 十二月, 2011 10:14

這幾天在測試 Gallery3, 測試 Gallery Remote 時, 發現原本裝的 Gallery2 在使用 Gallery Remote 時也無法正常登入. 登入時會出現這個錯誤訊息:

這錯誤在 Gallery Remote 的 FAQ 裡頭就有, 應該是一開始執行是會去使用 gallery_remote2.php, 如果不存在, 才會轉用別的 URL, 而在 Gallery2 的時候, 是沒有 gallery_remote2.php 的, 正常來說, 這個存取會回傳 404 not found 的錯誤, 不過... 由於我的 nginx 有對 404 做轉向的處理, 結果... 會造成實際收到的是 302 的轉向回應, 所以... 接下去就動作就不正常了.

原本希望保留我在 nginx 下的轉向設定, 只針對 gallery_remote2.php 回應 404 就可以. 不過... 試了一下, 發現似乎不能這樣子處理, 因為只要有轉向的設定, 不過是透過 php 去回應 404, 或在 nginx 對該 URL 回應 404, 都還是會去做轉向的動作.

最後... 只好在使用 Gallery2 的這個 virtual host 中不去對 404 做轉向處理, 改成回應 404 的錯誤. 如:

error_page 404 /internal_error_404_page.html;
location /internal_error_404_page.html {
internal;
}

這樣子改之後, 就可以正常登入了.

Del.icio.us Furl HEMiDEMi Technorati MyShare
迴響
暱稱:
標題:
個人網頁:
電子郵件:
authimage

迴響

  

Bad Behavior 已經阻擋了 138 個過去 7 天試圖闖關的垃圾迴響與引用。
Power by LifeType. Template design by JamesHuang. Valid XHTML and CSS