Hello. I wrote a high-performance HTTP event server in C++ and I want to make it work flawlessly with nginx and PHP-FPM (fastcgi). This is a snippet of my nginx configuration.
location ~ \.eve$ {
gzip off;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://127.0.0.1:9001;
proxy_intercept_errors on;
error_page 505 = @fallback // this is actually BACKEND.php
}
My event server returns 505 errors if there IS an event, otherwise it hangs, and eventually returns a "NO STATE CHANGE" directive that I handle with JS or what have you (this is basically comet). The point is that I would like nginx to catch the 505 error and forward that request to PHP so PHP can handle the event accordingly. My server is basically just an event hub, allowing many many users to be able to connect and see if there are any new events. If there IS an event, PHP handles the event distribution, including permissions and other volatile stuff.
The problem is that nginx isn't passing the POST (or GET) variables that were passed to *.eve, to BACKEND.php. Now I presume this is by design (due to the error_page directive), but I figured that there must be some way of making it work. My server runs on 9001, PHP-FPM runs on 9000. Any ideas?