admin管理员组文章数量:1353272
My CakePHP v3.x app runs fine in my local Vagrant environment, but when I deploy to Heroku, I get 403 errors for all javascript files located in /webroot/vendor/...
CSS and javascript files outside that directory load fine.
.js
.js
/Procfile
web: vendor/bin/heroku-php-apache2
This question sounds similar, but I checked and .htaccess already has the remended RewriteCond:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
My CakePHP v3.x app runs fine in my local Vagrant environment, but when I deploy to Heroku, I get 403 errors for all javascript files located in /webroot/vendor/...
CSS and javascript files outside that directory load fine.
https://example./js/i_load_fine.js
https://example./vendor/i_cause_403_error.js
/Procfile
web: vendor/bin/heroku-php-apache2
This question sounds similar, but I checked and .htaccess already has the remended RewriteCond:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Share
Improve this question
edited May 23, 2017 at 11:55
CommunityBot
11 silver badge
asked Oct 22, 2015 at 17:55
emersonthisemersonthis
33.4k60 gold badges222 silver badges384 bronze badges
3 Answers
Reset to default 9I wonder if "vendor" is a reserved word in Heroku?
yes, if you will be use "vendor" folder name, may be error 403 errors.
Because root dir web server vendor/bin/
.
Don't use public name "vendor" and "bin".
For what it's worth, I just saw the same issue (had a "vendor" folder that kept getting 403 errors).
I renamed the vendor folder to "v" (and fixed references) and everything worked just fine.
I wonder if "vendor" is a reserved word in Heroku?
Turns out that I had to specify the document root as a second parameter in the Procfile: web: vendor/bin/heroku-php-apache2 webroot/
本文标签: javascript403 error for js files in vendor directory on HerokuStack Overflow
版权声明:本文标题:javascript - 403 error for js files in vendor directory on Heroku - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743928593a2563422.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论