1
當我訪問www.mydomain.com/lib/hybridauth/index.php時,我看到了頁面的內容,沒有任何問題。使用HybridAuth登錄Facebook後,它會重定向到相同的url,但會傳遞url參數(www.mydomain.com/lib/hybridauth/index.php??hauth.done=Facebook & code = some-value & state = somevalue #=)。如果相同的url有url參數,Nginx會給我一個502錯誤的請求。我該如何處理這個問題?Nginx爲hybridauth返回url顯示502錯誤網關
server {
listen 80;
server_name www.mydomain.com;
root /var/www/html/mydomain;
location/{
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ /\.ht {
deny all;
}
}