Found it! Using geo $realip_remote_addr $isCF { ... } I can access the original IP.by gaspy - How to...
Hello, I'm trying to set up nginx to work with CloudFlare. I want 2 separate things that don't seem to work together: 1. I want to only allow connections from a list of CloudFlare IPs, rejecting any direct access that might bypass it. This can be easily done with an allow list of IPs followed by `deny all`. 2. I also want to get the real visitor IPs. This can be done with `set_real_ip_frby gaspy - How to...
Hello, I want nginx and a websocket server on same machine. Users must be able to access both on port 80/443. I do this currently by having 2 separate IPs, but for logistical reasons I'd prefer one IP. I know nginx can act as a proxy for a websocket server, but I also need the original IP to be carried to the websocket server, without additional headers. I saw a small tutorial on this, soby gaspy - How to...
Hi, I'm trying to redirect to a different page from homepage based on a cookie. Secondary objective is to also set that cookie. The method works with Javascript but when I try to do if with nginx, it doesn't work consistently. I have several location rules, but the one that's matched for homepage is location / { try_files $uri $uri/ /cms/assets/cache/supercache/$http_host/$cache_uri/by gaspy - How to...
OK, so I modified nginx and php5-fpm to talk on port 9000 and used tcpdump to see the traffic. It looks like it worked as packets arrived at 1 second intervals (the sleep(1) in my code). However in browser it was still the same. After more testing, it turns out there's something in my computer configuration that's causing it. Not sure yet if it's the antivirus or something else, but trying oby gaspy - Nginx Mailing List - English
"To ensure configuration of the PHP part is done correctly, you can dump communication between nginx and PHP." Now that sounds interesting. How can I do this?by gaspy - Nginx Mailing List - English
I already have fastcgi_buffering off (it was in my original email).by gaspy - Nginx Mailing List - English
Well, I tried with postpone_output off anyway, no joy. I verified that gzip is actually off. I'm out of ideas....by gaspy - Nginx Mailing List - English
Hi, I know this has been asked before, but I could not find a definitive answer. I tried different solutions, nothing worked. I have a PHP script that has to do time intensive operations and provide a status update from time to time. No way around it. I built a sample PHP script: <? @ini_set('zlib.output_compression',0); @ini_set('implicit_flush',1); @ob_end_clean(); ob_end_flush();by gaspy - Nginx Mailing List - English
I'm new to nginx. I love the gzip_static option and I;ve been thinking about the best way to generate, update and delete these files. I wrote an article here: http://www.richnetapps.com/generation-of-gzip-files-for-nginx/ My method uses inotifywait. I hope it's useful and that I didn't make any glaring errors.by gaspy - Nginx Mailing List - English
Maxim Dounin Wrote: ------------------------------------------------------- > > I have another server block just for redirect, I disabled SSL on it > but the > > problem persists. > > Here's how the other block looks like: > > > > server > > { > > listen 80; > > #listen 443 ssl; > > server_name mydomainby gaspy - Nginx Mailing List - English
> The message suggests you have another server{} listening on the > same port, without ssl_certificate defined, and it's selected > based on SNI. Hi Maxim and thanks for the quick reply. I have another server block just for redirect, I disabled SSL on it but the problem persists. Here's how the other block looks like: server { listen 80; #listen 443 ssl;by gaspy - Nginx Mailing List - English
I have a strange problem with SLL. I purchased a SSL cert and combined the intermediary files into one: cat www_mydomain_com.crt PositiveSSLCA2.crt AddTrustExternalCARoot.crt >> mydomain-budle.crt In the server conf I have the following: server { listen 80; listen 443 ssl; server_name www.mydomain.com; root /var/www/mydomain/; ssl_protocols SSLv3 TLSv1 TLSby gaspy - Nginx Mailing List - English