nginx module dev help: nginx http subrequest of type POST (including POST params)

2015-02-22 Thread quadmaniac
Hi nginx experts! This is my first post in this forum - I'm hoping you folks can throw some light on a problem I'm facing. I'm trying to develop a module very similar to the ngx_http_auth_request_module (nginx.org/en/docs/http/ngx_http_auth_request_module.html). While seeing the source code, I re

Re: How to $POST variables to php-fpm with nginx

2015-02-22 Thread Steve Holdoway
curl is the simplest... $Request = curl_init(); curl_setopt ( $Request, CURLOPT_URL, "http://api.example.com"; ); curl_setopt ( $Request, CURLOPT_ENCODING, 'gzip' ); curl_setopt ( $Request, CURLOPT_RETURNTRANSFER, true ); curl_setopt ( $Request, CURLOPT_POST

Re: Redirecting existing links to a sub-folder to a new subdomain

2015-02-22 Thread codecowboy
Hi, Thanks for your reply. I got this working. Here's what I ended up with in case it helps someone else: "rewrite /student-area/(.*) $scheme://studentarea.mydomainname.com/$1 permanent;" This was placed outside of any location {} blocks but within the server {} block. Posted at Nginx Forum: h

Re: Redirecting existing links to a sub-folder to a new subdomain

2015-02-22 Thread Francis Daly
On Sun, Feb 22, 2015 at 03:30:58AM -0500, codecowboy wrote: Hi there, > If I want to transform links from > http://exampledomain.com/sub-folder/some-article to > http://subdomain.exampledomain.com/some-article where subdomain has the same > name as the subfolder, do I need a rewrite or a redirect

Redirecting existing links to a sub-folder to a new subdomain

2015-02-22 Thread codecowboy
If I want to transform links from http://exampledomain.com/sub-folder/some-article to http://subdomain.exampledomain.com/some-article where subdomain has the same name as the subfolder, do I need a rewrite or a redirect? I *think* I need a redirect but want to be sure I am doing it the recommended