Re: Proxy pass set body on if

2021-02-23 Thread sanflores
Awesome, this approach totally work, thank you very much: worker_processes auto; error_log /var/log/nginx/error.log warn; pid/var/run/nginx.pid; events { worker_connections 1024; } http { default_type application/octet-stream; log_format main '$remote_addr - $remot

Re: Proxy pass set body on if

2021-02-22 Thread Francis Daly
On Mon, Feb 22, 2021 at 02:15:42PM -0500, sanflores wrote: Hi there, I suspect that if I were doing this, I would probably pick one url that is not otherwise used on my server (in this example, "/puppet/"), and use that as a "stepping stone". Then, if this request should be handled specially, re

Re: Proxy pass set body on if

2021-02-22 Thread sanflores
First of all, thanks for your help. Here is my configuration: cat nginx.conf - worker_processes auto; error_log /var/log/nginx/error.log warn; pid/var/run/nginx.pid; events { worke

Re: Proxy pass set body on if

2021-02-22 Thread Francis Daly
On Mon, Feb 22, 2021 at 07:52:04AM -0500, sanflores wrote: Hi there, > This would be great, but I don't know how to server the context from nginx > with a rewrite, what would work is: I'm afraid I don't fully understand what response you want to send to what request. Can you show some examples?

Re: Proxy pass set body on if

2021-02-22 Thread sanflores
This would be great, but I don't know how to server the context from nginx with a rewrite, what would work is: if ($is_NOT_a_bot) { rewrite in order to save the content in /usr/share/nginx/html } proxy_pass Posted at Nginx Forum: https://forum.nginx.org/read.php?2,290773,290820#msg-290820

Re: Proxy pass set body on if

2021-02-21 Thread Francis Daly
On Tue, Feb 16, 2021 at 10:00:47AM -0500, sanflores wrote: Hi there, > I have an Angular app and need to use puppeteer for SSR. In order to make it > work I need to send the request with the body but I can't figure how to make > these things work together. Can you see, which part is failing? Is

Re: Proxy Pass based on the first field in the URI

2019-09-14 Thread j94305
PS: If, like you mentioned in the other reply message, want to create environments dynamically, you could use the map directive with an include file that is dynamically updated by the deployment process of such an environment (and then do nginx -s reload), but even more elegant would be the replace

Re: Proxy Pass based on the first field in the URI

2019-09-12 Thread meir hazon
Sorry, the only random is the first part of the URI, Following is the right description, Dear Francis and friends, I am sorry if I wasn't clear enough, I appreciate your help and advice dearly. I was thinking on creating environments dynamically, Meaning, 1. the source "host" of the URL is stat

Re: Proxy Pass based on the first field in the URI

2019-09-12 Thread meir hazon
Dear Francis and friends, I am sorry if I wasn't clear enough, I appreciate your help and advice dearly. I was thinking on creating environments dynamically, Meaning, 1. the source "host" of the URL is random 2. The first field of the URI includes a random string with the environment ID. 3. Ba

Re: Proxy Pass based on the first field in the URI

2019-09-11 Thread Francis Daly
On Wed, Sep 11, 2019 at 08:41:15PM +0200, meir hazon wrote: Hi there, > I don't think so, it should always be the first field of the URI but it > would be a random string. I have to proxy pass and rebuild the new URI > based on location at the original URI only. I don't understand what your requ

Re: Proxy Pass based on the first field in the URI

2019-09-11 Thread meir hazon
Hi, It looks great, I will try it out and let you know. Thanks so much, Meir On Wed, Sep 11, 2019 at 5:56 PM j94305 wrote: > Try something like this: > > map $urlprefix $urlproxy { > "foo" "https://foohost.foo.com";; > "bar" "http://barhost.blah.com";; > "fie" "https://fie.special.domai

Re: Proxy Pass based on the first field in the URI

2019-09-11 Thread meir hazon
Hi, I don't think so, it should always be the first field of the URI but it would be a random string. I have to proxy pass and rebuild the new URI based on location at the original URI only. Could you think of a way to do this? Thanks so much, Meir On Wed, Sep 11, 2019 at 5:46 PM Francis Daly

Re: Proxy Pass based on the first field in the URI

2019-09-11 Thread j94305
Try something like this: map $urlprefix $urlproxy { "foo" "https://foohost.foo.com";; "bar" "http://barhost.blah.com";; "fie" "https://fie.special.domain.com/blubb";; default "https://standard.com";; } [...] location ~ "^/(?[^/]+)(?/.*)$" { [...] proxy_pass "$urlproxy$urlsuffix$is_

Re: Proxy Pass based on the first field in the URI

2019-09-11 Thread Francis Daly
On Wed, Sep 11, 2019 at 04:45:21PM +0200, meir hazon wrote: Hi there, > I would also like to pass the message to the proxy without the first part > of the URI but use the rest of it. http://nginx.org/r/proxy_pass includes the section: """ If the proxy_pass directive is specified with a URI, th

Re: Proxy Pass

2019-05-24 Thread Francis Daly
On Fri, May 24, 2019 at 08:54:23PM +0800, Sathish Kumar wrote: Hi there, > Server1: 2.2.2.2 - abc.domain.com, Port 443 > > Server2: 1.1.1.1 - def.domain.com and def.abc.com - Port 443 That suggests that your back-end server is running more than one https server on the same IP:port. Does it use

Re: Proxy Pass

2019-05-24 Thread Sathish Kumar
Hi Francis, All the requests are processing successfully but its logging to incorrect access log. Server1: 2.2.2.2 - abc.domain.com, Port 443 Server2: 1.1.1.1 - def.domain.com and def.abc.com - Port 443 On Fri, May 24, 2019, 8:44 PM Francis Daly wrote: > On Fri, May 24, 2019 at 09:23:44AM +

Re: Proxy Pass

2019-05-24 Thread Francis Daly
On Fri, May 24, 2019 at 09:23:44AM +0800, Sathish Kumar wrote: Hi there, I am not certain what server_name values correspond to what IP addresses or ports used; and I am not certain what nginx servers use ssl and what ones don't. If you don't get an answer to your question, perhaps it will be wo

Re: Proxy Pass

2019-05-23 Thread Sathish Kumar
Hi All, I have now tried to use FQDN but still same issue. server 1 server_name abc.com; access_log /var/log/nginx/abc.access.log; error_log /var/log/nginx/abc.error.log warn; location /abc { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $p

Re: Proxy Pass

2019-05-23 Thread Sathish Kumar
Hi Team, Please ignore my previous email. Kindly check the below config and suggest me a solution. server 1 server_name abc.com; access_log /var/log/nginx/abc.access.log; error_log /var/log/nginx/abc.error.log warn; location /abc { proxy_set_header X-Real-IP $remote_addr;

Re: Proxy Pass

2019-05-23 Thread Sathish Kumar
Hi Team, I am already setting below headers. server 1 server_name abc.com; access_log /var/log/nginx/abc.access.log; error_log /var/log/nginx/abc.error.log warn; location /abc { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forw

Re: Proxy Pass

2019-05-23 Thread Sathish Kumar
Hi Rozitis, Thanks for your reply. On Thu, May 23, 2019, 10:58 PM Reinis Rozitis wrote: > > Instead of IP address, if we use FQDN with https, do we have to validate > the SSL certificate on Proxy_Pass?. > > By default the certificate validation is turned off (and nginx just uses > the ssl fo

RE: Proxy Pass

2019-05-23 Thread Reinis Rozitis
> Instead of IP address, if we use FQDN with https, do we have to validate the > SSL certificate on Proxy_Pass?. By default the certificate validation is turned off (and nginx just uses the ssl for traffic encryption). If needed you can enable it with proxy_ssl_verify on; ( http://nginx.org/e

Re: Proxy pass and SSL certificates

2018-05-10 Thread Joncheski
Hello Meph, Not, exactly this has SSL. Here's a suggestion configuration: nginx.conf: -- user nginx; worker_processes auto; error_log /var/log/nginx/cloudssl.diakont.it.error.log; events { work

Re: Proxy pass and SSL certificates

2018-05-09 Thread Mephysto On Hell
Hello Goce, but with this configuration, can I disable SSL in target Nginx? Thanks in advance. Meph On 8 May 2018 at 09:34, Joncheski wrote: > Hello Meph, > > In configuration file "cloud.diakont.it.conf": > - "ssl_certificate" please set path of only public certificate of server > (cloud.diak

Re: Proxy pass and SSL certificates

2018-05-08 Thread Joncheski
Hello Meph, In configuration file "cloud.diakont.it.conf": - "ssl_certificate" please set path of only public certificate of server (cloud.diakont.it), and in "ssl_certificate_key" please set path of only private key of server (cloud.diakont.it). In configuration file "ssl-params.conff": - The c

Re: Proxy pass and SSL certificates

2018-05-04 Thread Mephysto On Hell
Hello Goce, thank you very much for you answer. I attached files you requested at this email. On 4 May 2018 at 13:34, Joncheski wrote: > Hello Meph, > > Can you send the other configuration file ( ssl-params.conf and > cloud.diakont.it.conf ) which you call in this configuration. > And in "loc

Re: Proxy pass and SSL certificates

2018-05-04 Thread Joncheski
Hello Meph, Can you send the other configuration file ( ssl-params.conf and cloud.diakont.it.conf ) which you call in this configuration. And in "location /" , you need to enter this "proxy_redirect default;" because this is default argument. Best regards, Goce Joncheski Posted at Nginx Forum:

Re: Proxy pass and URL rewrite with upstream

2017-12-21 Thread Zhang Chao
Hello! > With this configuration, only works the URL with a trailing slash > "http://systems.ltda.local/phpmyadmin/"; and not > "http://systems.ltda.local/phpmyadmin”. What do you mean of it doesn’t work with the URL without the trailing slash? Does the backend Apache server just returns 404? Th

Re: Proxy pass and URL rewrite with upstream

2017-12-21 Thread Aziz Rozyev
Hi create 4 separate upstreams for each of these apaches, create 4 locations, within each location block proxy_pass to appropriate upstream. avoid using sub_filters, they are mostly forrewriting bodies of html documents. http { # for phpadmin upstream phpadminup { server phpadmin.ltda.loca

Re: Proxy Pass | Upstream with query_string

2016-05-24 Thread Francis Daly
On Tue, May 24, 2016 at 10:17:55AM -0400, hbajaj2 wrote: Hi there, > I need to use proxy_pass directive for the upstream server which has > query_string, which allows it to authenticate to the upstream server. How > can i ensure that query string is pass-on with every request that goes via > this

Re: Proxy pass certificate autentificate TO MS IIS

2015-10-26 Thread Maxim Dounin
Hello! On Sun, Oct 25, 2015 at 02:38:33PM -0400, agrisv wrote: [...] > Maybe something with ssl renegotiation in nginx??? SSL renegotiation is completely forbidden in nginx as of now. If you are trying to connect to a server which requires renegotiation - it won't work. -- Maxim Dounin htt

Re: Proxy pass certificate autentificate TO MS IIS

2015-10-25 Thread agrisv
No i think it was something with favicon request.. now i always get getaway timeout 1. also try from different server with nginx 1.8 nothing helped.. proxy_ssl_verify off; proxy_ssl_certificate /etc/nginx/ssl/test/test.pem; proxy_ssl_certificate_key /etc/nginx/ssl/test/test_key.pem; proxy_pas

Re: Proxy pass certificate autentificate TO MS IIS

2015-10-25 Thread itpp2012
agrisv Wrote: --- > *4622 access forbidden by rule, client: 10.2.6.1 > IIS side: > 500 0 64 119971 > > So i hope someone could know why? Maybe the "access forbidden" is the issue? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,

Re: Proxy pass location inheritance

2014-02-18 Thread Igor Sysoev
> -Original Message- > From: nginx-boun...@nginx.org [mailto:nginx-boun...@nginx.org] On Behalf Of > Maxim Dounin > Sent: Tuesday, February 18, 2014 4:13 AM > To: nginx@nginx.org > Subject: Re: Proxy pass location inheritance > > Hello! > > On Mon, Feb 17, 2014 at 09

RE: Proxy pass location inheritance

2014-02-18 Thread Brian Hill
oun...@nginx.org] On Behalf Of Maxim Dounin Sent: Tuesday, February 18, 2014 4:13 AM To: nginx@nginx.org Subject: Re: Proxy pass location inheritance Hello! On Mon, Feb 17, 2014 at 09:26:56PM +, Brian Hill wrote: > So there is no precedence given to nested regex locations at all? What >

Re: Proxy pass location inheritance

2014-02-18 Thread Maxim Dounin
Hello! On Mon, Feb 17, 2014 at 09:26:56PM +, Brian Hill wrote: > So there is no precedence given to nested regex locations at > all? What value does nesting provide then? Nesting is to do thins like this: location / { # something generic stuff here location ~ \.jpg$ {

RE: Proxy pass location inheritance

2014-02-17 Thread Brian Hill
an option. From: nginx-boun...@nginx.org [nginx-boun...@nginx.org] on behalf of Maxim Dounin [mdou...@mdounin.ru] Sent: Monday, February 17, 2014 9:30 AM To: nginx@nginx.org Subject: Re: Proxy pass location inheritance Hello! On Mon, Feb 17, 2014 at 05:15:

Re: Proxy pass location inheritance

2014-02-17 Thread Maxim Dounin
Hello! On Mon, Feb 17, 2014 at 05:15:45PM +, Brian Hill wrote: > So it sounds like my only solution is to restructure the locations to avoid > the original match in /. I don't have access to the servers again until > tomorrow, but I'm wondering if something like this would work: > > locati

RE: Proxy pass location inheritance

2014-02-17 Thread Brian Hill
d / location break things? From: nginx-boun...@nginx.org [nginx-boun...@nginx.org] on behalf of Maxim Dounin [mdou...@mdounin.ru] Sent: Monday, February 17, 2014 5:13 AM To: nginx@nginx.org Subject: Re: Proxy pass location inheritance Hello! On Mon, Feb 17,

Re: Proxy pass location inheritance

2014-02-17 Thread Maxim Dounin
Hello! On Mon, Feb 17, 2014 at 08:55:02AM +, Brian Hill wrote: > Close, it's more akin to: > > location / { > location ~ regex1 { > # regex inside / > } > } > > location ~ regex2 { > location ~ regex3 { > # regex inside regex2 >

Re: Proxy pass location inheritance

2014-02-17 Thread Francis Daly
On Mon, Feb 17, 2014 at 08:55:02AM +, Brian Hill wrote: Hi there, > Regex 1 & 3 look for the same file types and are identical, but contain > different configurations based on the parent location. Currently, regex1 is > catching all matches, irrespective of the parent location. > > If I un

RE: Proxy pass location inheritance

2014-02-17 Thread Brian Hill
Is this correct, or will NGINX always give priority to the / location? From: nginx-boun...@nginx.org [nginx-boun...@nginx.org] on behalf of Maxim Dounin [mdou...@mdounin.ru] Sent: Friday, February 14, 2014 4:19 AM To: nginx@nginx.org Subject: Re: P

Re: Proxy pass location inheritance

2014-02-14 Thread Maxim Dounin
Hello! On Thu, Feb 13, 2014 at 06:43:08PM +, Brian Hill wrote: > Hello, we are using NGINX to serve a combination of local and > proxied content coming from both an Apache server (mostly PHP > content) and IIS 7.5 (a handful of third party .Net > applications). The proxy is working properl

Re: Proxy Pass Redirect Problem

2013-12-14 Thread david
Nevermind. I found my error. I was doing kill -HUP and had a typo in my config. I didnt notice until I checked the config. Thank you its working as expected. Sorry for the noise. On 12/13/13 12:48 PM, Maxim Dounin wrote: Hello! On Fri, Dec 13, 2013 at 12:25:02PM -0500, david wrote: Not

Re: Proxy Pass Redirect Problem

2013-12-14 Thread david
Maxim! Thank you. I must of missed something because it does not seem to solve my issue. I removed the $uri param from the proxy_pass. I also tried adding proxy_redirect (But I think that belongs to the @wsgi block and not the @store block. But I am not exactly sure.) Because my understand

Re: Proxy Pass Redirect Problem

2013-12-13 Thread Maxim Dounin
Hello! On Fri, Dec 13, 2013 at 12:25:02PM -0500, david wrote: > Not sure if this is my configuration causing this symptom or openresty. > > Here is whats happening. > > If I try to access the store "admin" > via: http://mysite.com/admin > > I am getting proxy redirects sent to my browser and s

Re: proxy pass with rewrite

2013-10-25 Thread Francis Daly
On Fri, Oct 25, 2013 at 01:25:10PM +0200, Philipp Kraus wrote: > Am 25.10.2013 um 10:01 schrieb Francis Daly : Hi there, > > https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy > > looks like it may have useful information. > > I have used this how to, but I cannot

Re: proxy pass with rewrite

2013-10-25 Thread Philipp Kraus
Hi, Am 25.10.2013 um 10:01 schrieb Francis Daly : > https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy > looks like it may have useful information. I have used this how to, but I cannot create a working solution > Fix jenkins so that it knows it is below /jenkins/,

Re: proxy pass with rewrite

2013-10-25 Thread Francis Daly
On Fri, Oct 25, 2013 at 07:57:01AM +0200, Philipp Kraus wrote: Hi there, > I would like to configure ngix with jenkins, nginx should be a proxy for the > jenkins instance. I have configuration the proxy pass options in this way: > https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+N

Re: proxy pass encoding % problem

2013-05-07 Thread jradd
Try issuing the directive; proxy_set_header >proxy_set_header Host $host:$proxy_port; Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238933,238976#msg-238976 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo

Re: proxy pass encoding % problem

2013-05-07 Thread Maxim Dounin
Hello! On Tue, May 07, 2013 at 06:48:11AM -0400, Krupa wrote: > There are no rewrite policies. > location /gw_proxy { > #internal; > #resolver 8.8.8.8; > proxy_http_version 1.1; > proxy_pass http://50.112.76.185:9001; > proxy_pass_reque

Re: proxy pass encoding % problem

2013-05-07 Thread Krupa
There are no rewrite policies. location /gw_proxy { #internal; #resolver 8.8.8.8; proxy_http_version 1.1; proxy_pass http://50.112.76.185:9001; proxy_pass_request_body off; proxy_set_header Content-Length 0; } invoke

Re: proxy pass encoding % problem

2013-05-07 Thread Maxim Dounin
Hello! On Tue, May 07, 2013 at 05:45:50AM -0400, Krupa wrote: > I am using nginx as a reverse proxy. My requirement is nginx needs to pass > the url passed by client as-is to the proxy server. > I have set the proxy_pass to hostname:port without the uri part > As per the docs ,If it is necessary

Re: proxy pass keepalive without upstream module

2013-05-03 Thread Maxim Dounin
Hello! On Fri, May 03, 2013 at 12:41:02PM +0100, Richard Kearsley wrote: > Hi > I read here that keepalives to backend can be enabled with the > upstream module > (http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive) > But can they be used without defining an upstream block? Ju