ruby on rails - nginx: remove path from proxy_pass on named location -
i have nginx config serve rails app:
location ^~ /api/ { alias /srv/www/rails/public/; try_files $uri @unicorn; } location @unicorn { proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header x-forwarded-proto $scheme; proxy_set_header host $http_host; proxy_redirect off; proxy_pass http://127.0.0.1:2007; } i want remove /api/ start of path before passing rails app, since it's named location can't add "/" @ end of proxy_pass directive, how can remove /api/ before passing request rails?
Comments
Post a Comment