Below is my config. The folder /site/private is supposed to show the
usual HTTP authentication box, but the php files from that folder just
start downloading in clear text. What am I doing wrong? The path of the
passwd file is correct.
proxy_pass http://MY.IP.IS.HERE:8081;
include proxy.inc;
} #-- End of root location
location @backend {
internal;
proxy_pass http://MY.IP.IS.HERE:8081;
include proxy.inc;
}
On Sun, Jun 05, 2011 at 04:22:46PM -0400, pk899 wrote:
Below is my config. The folder /site/private is supposed to show the
usual HTTP authentication box, but the php files from that folder just
start downloading in clear text. What am I doing wrong? The path of the
passwd file is correct.
It’s not clear what is the problem you are complaining about.
PHP files in clear text? You don’t have any processing for php
defined in location /site/private. Default behaviour is to serve
anything as static. So php files being served as static is
expected result of your config.
No HTTP authentication box? It should appear only once per
browser start (or may not appear at all if you’re brave enough to
save your password in browser). Check data of the wire or nginx
logs (access log should be enough) to see if authentication really
happens.
Right now the /site/private location is for handling static files
only. You’ve not defined any handler for scripts or any type of
upstream. So that’s what you should get. Download the file when you
request it.
— appa
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.