NGINX SMTP!

2019-12-18 Thread shahzaib mushtaq
Hi, We want to achieve following with nginx smtp, please let me know if that's possible and can you help me with that ? 1) Our software will connect to NGinx on port 25 and will authenticate with the NGinx in the same manner as it would to SMTP Server. 3) NGinx should then authenticate against an

Re: proxy module handling early responses

2019-12-18 Thread Maxim Dounin
Hello! On Wed, Dec 18, 2019 at 10:09:56AM -0800, Frank Liu wrote: > Our upstream returns HTTP/413 along with "Connection: close" in the header, > then closes the socket. It seems nginx catches the socket close in the > middle of sending the large payload. This triggers additional 502 and > client

Re: proxy module handling early responses

2019-12-18 Thread Frank Liu
Our upstream returns HTTP/413 along with "Connection: close" in the header, then closes the socket. It seems nginx catches the socket close in the middle of sending the large payload. This triggers additional 502 and client gets both 413 and 502 from nginx. On Wed, Dec 18, 2019 at 7:22 AM Maxim Do

Re: nginx reverse proxy proxy_pass weirdness

2019-12-18 Thread deeztek
okay that explains it. I appreciate that. So, a default config with the following: server { listen 80 default_server; return 444; } Should take care of it? How would I got about doing a default SSL config since it would complain about the certificate? Thanks Posted at Ngin

Re: nginx reverse proxy proxy_pass weirdness

2019-12-18 Thread Francis Daly
On Wed, Dec 18, 2019 at 10:33:44AM -0500, deeztek wrote: Hi there, > Sorry maybe I am confusing you. The config file that I posted, works fine. > What I request actually responds. So, if I were to request www.domain.tld, > the Apache server behind Nginx responds with the correct website for > www

Re: nginx reverse proxy proxy_pass weirdness

2019-12-18 Thread deeztek
Sorry maybe I am confusing you. The config file that I posted, works fine. What I request actually responds. So, if I were to request www.domain.tld, the Apache server behind Nginx responds with the correct website for www.domain.tld. However, if I were to delete the config file for domain.tld from

Re: proxy module handling early responses

2019-12-18 Thread Maxim Dounin
Hello! On Tue, Dec 17, 2019 at 06:37:58PM -0800, Frank Liu wrote: > When using nginx as a reverse proxy, in case of a large POST payload, what > does nginx do when upstream server sends response before nginx finishes > posting the full payload? > > One use case is upstream enforces some payload

Re: nginx reverse proxy proxy_pass weirdness

2019-12-18 Thread Francis Daly
On Wed, Dec 18, 2019 at 07:18:32AM -0500, deeztek wrote: Hi there, > Here's an example config that I use: Thanks. Note that it is possible that the "include" files contain some relevant config; but we can worry about that if it looks like it is the case. What request do you make? What respons

Re: nginx reverse proxy proxy_pass weirdness

2019-12-18 Thread deeztek
Here's an example config that I use: server { server_name domain.tld www.domain.tld; add_header Strict-Transport-Security "max-age=31536000; preload"; keepalive_timeout 70; #LOGS CONFIG access_log /usr/local/nginx/logs/domain.tld/domain.tld_access.

Re: nginx reverse proxy proxy_pass weirdness

2019-12-18 Thread Francis Daly
On Wed, Dec 18, 2019 at 04:48:33AM -0500, deeztek wrote: Hi there, > I have a nginx reverse proxy to forward requests to various Apache websites > behind it. This all seems to work fine unless I remove one of the proxy_pass > configurations from nginx. Even though I remove it, nginx still fowards

nginx reverse proxy proxy_pass weirdness

2019-12-18 Thread deeztek
I have a nginx reverse proxy to forward requests to various Apache websites behind it. This all seems to work fine unless I remove one of the proxy_pass configurations from nginx. Even though I remove it, nginx still fowards the requests back to Apache to a seemingly random website this time. I ca