Redirect for root doesn't seem to work
cancan101 opened this issue · comments
Alex Rothberg commented
This does not seem to work:
"redirects": {
"/": {
"url": "https://page.example"
}
}
Instead I get in the logs:
[error] 35#0: *6 directory index of "./dist/" is forbidden, client: XXXX, server: , request: "GET / HTTP/1.1", host: "YYYYY-pr-23.herokuapp.com"
Alex Rothberg commented
Probably due to this block being explicit :
heroku-buildpack-static/scripts/config/templates/nginx.conf.erb
Lines 58 to 66 in bde9522
Alex Rothberg commented
I followed #53 (comment) and add this script which seems to fix the issue:
sed -i 's:try_files $uri.html $uri $uri/ $fallback;:try_files $uri.html $uri $fallback;:g' /app/bin/config/templates/nginx.conf.erb
Ed Morley commented
Hi
This buildpack is now deprecated and we are recommending people move the more actively maintained heroku-buildpack-nginx. For migration advice see here.
As such, I'm closing this issue out since we won't be making further changes to this buildpack.