当我访问www.mydomain.com/lib/hybridauth/index.php时,我看到了页面的内容,没有问题。使用HybridAuth登录Facebook后,它会重定向到相同的网址但传递了url参数(www.mydomain.com/lib/hybridauth/index.php??hauth.done=Facebook&code=some-value&state=somevalue # = 的)。如果相同的url有url参数,Nginx会给我一个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;
}
}
答案 0 :(得分:0)
我似乎通过在php.ini中禁用opcache来解决这个问题。