Welcome! Log In Create A New Profile

Advanced

Re: nginx Digest, Vol 66, Issue 45

April 30, 2015 04:50PM
> On Apr 30, 2015, at 5:00 AM, nginx-request@nginx.org wrote:
>
> Send nginx mailing list submissions to
> nginx@nginx.org
>
> 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
> nginx-request@nginx.org
>
> You can reach the person managing the list at
> nginx-owner@nginx.org
>
> 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 <tfransosi@gmail.com>
> To: nginx@nginx.org
> Subject: Re: Trying to "see" my NGINX downloads folder via https?
> Message-ID:
> <CACnwZYdDbk+SE9WRx1pzB-zcrOEqFT8qEpj111xZSZxy6t_Fvg@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Wed, Apr 29, 2015 at 8:56 PM, silsurf Google <silsurf@gmail.com> 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 <aqqa11@earthlink.net>
> To: nginx@nginx.org
> Subject: proxy_redirect not working with "refresh"
> Message-ID:
> <7705660.1430376194425.JavaMail.root@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 <francis@daoine.org>
> To: nginx@nginx.org
> Subject: Re: proxy_redirect not working with "refresh"
> Message-ID: <20150430081119.GD29618@daoine.org>
> 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 francis@daoine.org
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 30 Apr 2015 09:14:31 +0100
> From: Francis Daly <francis@daoine.org>
> To: nginx@nginx.org
> Subject: Re: Trying to "see" my NGINX downloads folder via https?
> Message-ID: <20150430081431.GE29618@daoine.org>
> 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 francis@daoine.org
>
>
>
> ------------------------------
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
> End of nginx Digest, Vol 66, Issue 45
> *************************************

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Re: nginx Digest, Vol 66, Issue 45

silsurf April 30, 2015 04:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready