English 中文(简体)
nginx not forwarding POST to @fallback
原标题:nginx not forwarding POST to @fallback

我在C++上写出了一个高性能的吉大港山区活动服务器,我希望使其与 n和PHP-FPM(fastcgi)毫无关系地工作。 这是我原产地组合的幻灯。

    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
    }

我的活动服务器将505个错误退回,如果发生国际会计学会的活动,否则会hang,并最终退回我与联合提交书或你所处理(基本上就是这样)。 问题在于,我原想追捕505个错误,并将这一请求转交PHP,以便PHP能够相应地处理这一事件。 我的服务器基本上只是一个活动中心,使许多用户能够连接起来,看是否有任何新事件。 如果有这个活动,公共卫生和社会福利部就处理活动分配问题,包括许可和其他挥发性的障碍。

问题是,Nginx是向BACKEND.php传递的POST(或GET)变量。 现在,我假定这是设计的(由于错误——页指令),但我表示,必须有一些办法使这一指令发挥作用。 我的服务器运行在9001台,PHP-FPM运行在9000台。 任何想法?

最佳回答

我只是重建了最近版的原状,从而确定了这一问题。 召集会议,以及专业和专业资格考试和晋升考试委员会,都是完美的。 Weirdness.

问题回答

Your server can return a response with X-Accel-Redirect header pointing a backend url. In this case nginx will make the request to the url and return the response back to the user. No 30[12] redirects, just as if user requested the url in the first place.

http://kovyrin.net/2006/11/01/nginx-x-accel-redirect-php-rails/
Google for other examples.

这一概念是独特的,但与X-Sendfile的头盔混在一起。

I would not count on POST request parameters passing here. Mirror POST parameters in GET ones of X-Accel-Redirect return, if your backend can accept that. error_page won t pass any indeed.





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签