New answers tagged

0

Both in Linux and Windows the program which opens connection must set keep alive option on the socket for keep alive packets to be sent. We just updated nginx code to enable keep alive for all opened sockets. File to update: src/event/ngx_event_connect.c Code to enable keep alive (tested only on Linux): /* Set the option active */ int ...


0

You misunderstand the "lack" of SNI support. First, nginx is generally fine for "wildcard" SSL setups. The support issue is in older clients (i.e. browsers), which are not capable of handling SNI.


1

Basically there are three big steps in your workflow Encryption and decryption process either by STARTTLS or SMTPS Authentication process i.e. to check if you allowed to do SMTP transaction SMTP Transcription (MAIL FROM, RCPT TO and so on) As far as I understand, you want to use nginx to do step 1, and transparently pass the rest of the transaction to ...


0

Using the exclamation mark ! you can define an exclude before your existing ProxyPass rule to define a subdirectory that should not be forwarded: ProxyPass /blog ! ProxyPass / ajp://... ProxyPassReverse / ajp://...


0

You can use Nginx as an SMTP proxy server. Read the link, but it should look something like this worker_processes auto mail { server_name mail.example.com; http_auth localhost:9000/cgi-bin/nginxauth.cgi; proxy_pass_error_message on; ssl on; starttls on; ssl_certificate /etc/ssl/certs/server.crt; ...


0

It seems squid defined the concept of "Connection Pinning" to solve this. http://wiki.squid-cache.org/Features/ConnPin


0

It seems that the problem is the extra $ in the rewrite rule (in the first argument). I removed it and it has started working fine. location /test { rewrite ^/test/(.*) /$1 break; proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header ...


0

The first two vhosts works as expected. Kind of. They share the same ServerName which does not make sense since what's unique about a vhost is the port+servername combination. Apache here is actually silently using the first vhost definition when it receives a http://mydomain.fr or http://www.mydomain.fr/. For all other *.mydomain.fr it will use the ...


0

I suspect you forgot "ProxyPreserveHost On". Without this directive, your app is contacted with the HTTP "Host: 1.1.1.1" header, while when you were browsing directly it would see "Host: the.domain.com".


0

The IDP was configured to make a POST request to http://server.com/Shibboleth.sso/SAML/POST which maps to the SAML 1.1 protocol. As you can see from the assertion, the protocol is SAML 2.0. Therefore I had to change the ACS URL to http://server.com/Shibboleth.sso/SAML2/POST


0

You can do it using: Reverse Proxy Request Headers (X-Forwarded-For) mod_proxy - Apache HTTP Server Version 2.4 mod_remoteip - Apache HTTP Server Version 2.5 Tutorial: Apache 2.4 as reverse proxy - LeaseWeb labs - covers second bullet point. for mod_proxy: LogFormat "%v %{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" ...


2

It's become default behaviour starting since version 1.9.13 To change it back manually you can use: proxy_next_upstream error timeout non_idempotent;


0

My wrong. RewriteRule is bad for that. I have resolved the problem. I sould use ProxyPassMatch and now it works. ProxyPassMatch "^/server/(.*)/banner/(.*)$" "http://mg-cdn.ovh/banners/banner_$2_$1.png"


0

A different solution that may work for others: use the .pem file for both ssl_certificate and ssl_certificate_key That is: ... ssl on; ssl_certificate conf.d/cert.pem; ssl_certificate_key conf.d/cert.pem; ...


0

That's because nginx can't do that. It can terminate an SSL connection, but it cannot pass one through. You have at least two options: Stick the SSL certificates in a tiny Docker volume that's shared between your letsencrypt container and your nginx container. While you're at it, you may as well let nginx intercept Let's Encrypt challenges as well, which ...


1

If nginx is running, but cannot connect to its upstream server, e.g., to tomcat, then you'd be getting a 50x-style error, NOT a connection refused one. Browser reports site refused to connect. ERR_CONNECTION_REFUSED – Chethan S. Apr 21 at 15:34 This means that you cannot connect to nginx in the first place. Are you sure it is running? Best way to ...


0

facepalm It turns out that I was missing a trailing slash on my ProxyPass directive: ProxyPass "/site/" "balancer://cms" should have been: ProxyPass "/site/" "balancer://cms/" (Note the trailing slash before the close-quote.) That literally fixed everything. I'm happy to delete this question and answer if folks want to close it as "simple ...


0

We pass in the upstream addr as a separate header like this server { listen 80; server_name example.com; location / { proxy_pass http://main; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; add_header X-Upstream $upstream_addr; } } What if you tried? server { listen 80; ...


1

http{ ... server { listen 80; server_name api.example.com; #charset koi8-r; access_log logs/api.example.com.access.log combined; location / { proxy_set_header X-Real-IP $remote_addr; proxy_pass http://servername1; root path1; } } server { listen 80; server_name ...


3

Your two server blocks will always conflict such that the first observed server block in the configuration file will be taking precedent as the default server block for all requests, unless you specify a proper server_name for each config to apply to incoming requests for that hostname / subdomain. (This applies also for all requests of which a requested ...



Top 50 recent answers are included