修改请求的Cookie信息。如下:
proxy_set_header Cookie “$http_cookie; XDEBUG_SESSION=PHPSTROM”;
完整的一份配置
server {
listen 80; #from https port to http port .
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Cookie "$http_cookie; XDEBUG_SESSION=PHPSTROM";
proxy_set_header Host $host;
}
}
server {
listen 8080;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9090;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}