开发者

403 error when moving CodeIgniter app from localhost to QA server

开发者 https://www.devze.com 2023-03-18 22:00 出处:网络
I’ve looked in the forums (both here and on CodeIgniter.com) but haven’t found any answers that help. I have a CI 2.0.2 app that I developed locally in MAMP. It works perfectly. I copied the entire

I’ve looked in the forums (both here and on CodeIgniter.com) but haven’t found any answers that help. I have a CI 2.0.2 app that I developed locally in MAMP. It works perfectly. I copied the entire CI install up to our QA server, and am getting 403 Forbidden errors on every single page (even the default.) The file permissions are the same as all our other (non-CI) apps on that server. We don’t have a .hta开发者_运维技巧ccess file on the server anywhere, aside from the ones in the CI install. I’ve renamed those files so they shouldn’t be causing any access errors, but I still can’t get at any of my pages.

Can anyone point me in the right direction? I really don’t know where else to look at this point.


The problem you've mentioned happens most of the times when your webserver (apache) does not have read access to the application's directory. Make sure the directory has permissions of 755 and see if that works.

As Jakub has pointed out in the comments, it is generally a good practice (from security standpoint) that instead of using chmod 755 on all directories, it is better to use chown and tie it to a user account and allow group read/write permissions. Adding apache to the user's group would remove such problems.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号