> On Apr 30, 2015, at 5:00 AM, [email protected] wrote: > > Send nginx mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.nginx.org/mailman/listinfo/nginx > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of nginx digest..." > > > Today's Topics: > > 1. Re: Trying to "see" my NGINX downloads folder via https? > (Thiago Farina) > 2. proxy_redirect not working with "refresh" (John) > 3. Re: proxy_redirect not working with "refresh" (Francis Daly) > 4. Re: Trying to "see" my NGINX downloads folder via https? > (Francis Daly) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 30 Apr 2015 00:12:38 -0300 > From: Thiago Farina <[email protected]> > To: [email protected] > Subject: Re: Trying to "see" my NGINX downloads folder via https? > Message-ID: > <cacnwzyddbk+se9wrx1pzb-zcroeqft8qepj111xzszxy6t_...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Wed, Apr 29, 2015 at 8:56 PM, silsurf Google <[email protected]> wrote: >> I have NGINX installed on a VPN and I would like to access the "downloads" >> folder via https. I followed instructions given to me as follows: >> > Is your server listening on port 443? >
Yes, all ports are open Henry > -- > Thiago Farina > > > > ------------------------------ > > Message: 2 > Date: Thu, 30 Apr 2015 02:43:14 -0400 (GMT-04:00) > From: John <[email protected]> > To: [email protected] > Subject: proxy_redirect not working with "refresh" > Message-ID: > > <7705660.1430376194425.javamail.r...@elwamui-polski.atl.sa.earthlink.net> > > Content-Type: text/plain; charset=UTF-8 > > http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect says: > > "(proxy_redirect) Sets the text that should be changed in the ?Location? and > ?Refresh? header fields of a proxied server response." > > All examples I found online only mentioned how it works with "Location", and > that also works perfectly with me. > > But it just doesn't work with "Refresh" for me. My backend site > http://192.168.1.9/test.html is: > > <html><head> > <meta http-equiv="refresh" content="0;url=http://192.168.1.9/" /> > </head></html> > > The nginx on my proxy 1.2.3.4 reads: > > location / { > proxy_pass http://192.168.1.9; > proxy_set_header Host $host; > proxy_redirect default; > proxy_redirect http://192.168.1.9/ /; > proxy_redirect http://$proxy_host/ /; > proxy_redirect ~.* /; > proxy_redirect / /; > } > > You can see I have exhausted all options on that nginx documentation. But > after restarting nginx, "curl 1.2.3.4/test.html" still sees that "Refresh" > line not translated to http://1.2.3.4/, and visiting http://1.2.3.4/test.html > on browser will still redirect me to http://192.168.1.9/, which is > unreachable. > > Did I miss anything? Actually I don't understand that line about > "proxy_set_header Host $host", I just copied from web. > > Thank you! > > > > ------------------------------ > > Message: 3 > Date: Thu, 30 Apr 2015 09:11:19 +0100 > From: Francis Daly <[email protected]> > To: [email protected] > Subject: Re: proxy_redirect not working with "refresh" > Message-ID: <[email protected]> > Content-Type: text/plain; charset=utf-8 > > On Thu, Apr 30, 2015 at 02:43:14AM -0400, John wrote: > > Hi there, > >> http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect says: >> >> "(proxy_redirect) Sets the text that should be changed in the ?Location? and >> ?Refresh? header fields of a proxied server response." >> >> All examples I found online only mentioned how it works with "Location", and >> that also works perfectly with me. >> >> But it just doesn't work with "Refresh" for me. My backend site >> http://192.168.1.9/test.html is: >> >> <html><head> >> <meta http-equiv="refresh" content="0;url=http://192.168.1.9/" /> >> </head></html> > > That's not a "Refresh" header field. > > That is something in the http response body. > > In general, nginx doesn't mess with the response body. > > (You can configure it to, but I tend to dislike doing that.) > >> Did I miss anything? Actually I don't understand that line about >> "proxy_set_header Host $host", I just copied from web. > > Why does your back-end include the string "http://192.168.1.9/" in its > response body? > > Can you make it instead include a string based on the Host: header it > receives? If so, that is what the "proxy_set_header Host $host" is for. > > f > -- > Francis Daly [email protected] > > > > ------------------------------ > > Message: 4 > Date: Thu, 30 Apr 2015 09:14:31 +0100 > From: Francis Daly <[email protected]> > To: [email protected] > Subject: Re: Trying to "see" my NGINX downloads folder via https? > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > On Wed, Apr 29, 2015 at 04:56:18PM -0700, silsurf Google wrote: > > Hi there, > >> In order to download your files from your vpn, you will move the download >> folder of deluge into nginx www folder. For example: downloads folder >> (/usr/share/nginx/www/downloads). Your files will be accessible at >> http://ip-address/downloads. > >> In that file I replaced >> >> root /usr/share/nginx/html; >> index index.html index.htm; >> >> with >> >> root /usr/share/nginx/www/downloads > > http://nginx.org/r/root > > What request do you make? > > What response do you get? > > What response do you want? > > If you want "the listing of the directory /usr/share/nginx/www/downloads, > for the request /downloads/", then you want "root /usr/share/nginx/www" > as your relevant configuration. > > f > -- > Francis Daly [email protected] > > > > ------------------------------ > > _______________________________________________ > nginx mailing list > [email protected] > http://mailman.nginx.org/mailman/listinfo/nginx > > End of nginx Digest, Vol 66, Issue 45 > ************************************* _______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
