nginx sends 301 redirect for alias in location

2018-09-04 Thread Peter Volkov
Hi. Could you, please, explain. Why nginx sends 301 redirect for the following vhost: server { listen 80; server_name test.domain.tv ; access_log off; location = /test/README.txt { alias /var/www/; } } Here is redirect: $ http http://t

Re: if( variable exists )

2018-09-04 Thread hhtjim
$arg_proxy ?aaa.com?proxy ``` if ($args ~ '(&|^)proxy([&=]|$)' ) { #exists set $port '8080'; } ``` Posted at Nginx Forum: https://forum.nginx.org/read.php?2,224860,281102#msg-281102 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/

Re: Reverse proxy

2018-09-04 Thread tokers
Hello! Have you tried to detect the network interconnection between these dockers? The default proxy connect timeout is 60s, it’s large enough, this problem should not be issued by Nginx itself. Best Regards Alex Zhang https://github.com/tokers ___ ngi

Problem when reconfiguring Nginx for SSL with self-signed certificate

2018-09-04 Thread Frank_Mascarell
I have a VPS on Digital Ocean with Ubuntu 18.04, Nginx, Gunicorn, Django, and a test web application, all configured (ufw) to work with http: 80. Everything works perfectly. Tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18

Reverse proxy

2018-09-04 Thread Jagannath Bilgi via nginx
Hi All, New to nginx and reverse proxies. Trying to setup reserves proxy using nginx and docker. Have defined upstream in nginx config and created dependency in docker-compose as well. However getting time out error.  Attached docker-compose and nginx.conf file for reference. Below is the error

NGINX Logs balancerWorkerName but NOT balancerName

2018-09-04 Thread systrex
Hello All, I have a situation where NGINX appears to be logging the balancerWorkerName but NOT the balancerName... The requests are a 404, the balancerName exists. Any idea why this would be happening? how can you serve a request out of a balancerWorker WITHOUT the balancerName cluster? Posted a

Re: Set `expires` by MIME type

2018-09-04 Thread Francis Daly
On Tue, Sep 04, 2018 at 09:41:44AM -0400, petecooper wrote: Hi there, > I confirm it's working as expected now, Content-Type and Expires is received > correctly. Great that you have it working for you now. Cheers, f -- Francis Dalyfran...@daoine.org ___

Re: Set `expires` by MIME type

2018-09-04 Thread petecooper
Francis Daly Wrote: --- > It seems to work for me: > > "xml" should have 0s, so now. > "rss" should have 1h. > "png" should have 1M. > > $ curl -s -i http://127.0.0.1/a.xml | grep '^Content-Type\|^Expires' > Content-Type: text/xml > Expires: Tu

Re: Set `expires` by MIME type

2018-09-04 Thread Francis Daly
On Mon, Sep 03, 2018 at 04:13:51PM -0400, petecooper wrote: Hi there, > I am attempting to use `expires` on Nginx 1.15.3 to define the expiry of > files on a per MIME type basis. It seems to work for me: "xml" should have 0s, so now. "rss" should have 1h. "png" should have 1M. $ curl -s -i htt

Re: Set `expires` by MIME type

2018-09-04 Thread Richard Stanway
I recently implemented something similar, and one issue I ran in to was that $sent_http_content_type doesn't always map to a mime type. For example, "Content-Type: text/html" would match mime type text/html, but "Content-Type: text/html; charset=utf-8" would match only the default. You need to all

Re: add checksum to nginx log entries

2018-09-04 Thread Francis Daly
On Mon, Sep 03, 2018 at 09:26:42AM -0400, prajos wrote: Hi there, > I'm wondering if there is a ready way to add a checksum (e.g. CRC) to the > end of each log entry before they get written to the "access" or "error" log > files? I believe that stock nginx does not include a way to do that. > O

Re: reverse proxy multiple subdomains problems

2018-09-04 Thread Francis Daly
On Mon, Sep 03, 2018 at 04:07:49PM -0400, c0mputerking wrote: Hi there, > I am new with nginx and have a hunch that it may have something to do with > $server_name$request_uri not being the right option in my case but i'm not > sure see config below Correct. You probably want $host instead of