Re: Separated reverse proxy for different users

2017-09-15 Thread ivy
Bingo! > try_files $uri $uri/ =404; This line was inherited from default configuration of nginx. As newbie I am afraid to change anything I don't completely understand. Thank you very much for help, Francis. :-) Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276150,276406#msg-276406

Re: Separated reverse proxy for different users

2017-09-03 Thread Ish Sookun
Hi Ivy, On 09/02/2017 11:53 PM, ivy wrote: > location / { > try_files $uri $uri/ =404; > auth_basic "restricted content"; > auth_basic_user_file "/home/secure/.passwords"; > auth_request_set $auth_status $upstream_status; > > proxy_pass http://127.0.01:$rp_port > }

Re: Separated reverse proxy for different users

2017-09-03 Thread Francis Daly
On Sat, Sep 02, 2017 at 03:53:52PM -0400, ivy wrote: Hi there, there are a few things here I'm not sure about. > location / { > try_files $uri $uri/ =404; Why is that line there? That probably says "return 404 to most requests". You report that you get a 404 to most requests. Remove tha

Re: Separated reverse proxy for different users

2017-09-02 Thread ivy
Hi Francis, Thanks for your reply. I added default value to map file and replaced "localhost" with 127.0.0.1 So currently the map file looks like: ivy 10080; john 10081; default 65355; The conf.file looks like: map $remote_user $rp_port { include /home/secure/reverse_proxy.map; } server {

Re: Separated reverse proxy for different users

2017-08-30 Thread Francis Daly
On Fri, Aug 25, 2017 at 06:33:11AM -0400, ivy wrote: Hi there, > Therefore, I want to add a map: > map $remote_user $rp_port { >include /home/secure/reverse_proxy.map; > } > > The map contains: > ivy 10080; > john 10081; > > From documentation I understood this should come befor

Separated reverse proxy for different users

2017-08-25 Thread ivy
Hi, I'm relatively new to HTTP servers and absolutely new to nginx. I have HTTP server which should ask user credentials and redirect every user to its own reverse proxy. The initial setting is: server { listen 80 default_server; listen [::]:80 default_server ipv6only=on;