/
location on passenger standalone port (5000) but few other subdirectories must be served by "pure" nginx. I'm trying configurations likeserver {
listen 443;
root /path/to/rails/public;
server_name example.com;
ssl on;
# ... some ssl config
# this is used for passenger standalone on port 5000
location / {
proxy_pass https://127.0.0.1:5000;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_buffering off;
}
# this is not passenger standalone!
location /subdir {
proxy_pass https://127.0.0.1;
auth_basic "Restricted access area authorization needed.";
auth_basic_user_file /path/to/.htpasswd;
}
}