403 error when moving CodeIgniter app from localhost to QA server

女生的网名这么多〃 提交于 2019-12-25 03:54:29

问题


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 .htaccess 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.


回答1:


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.



来源:https://stackoverflow.com/questions/6601263/403-error-when-moving-codeigniter-app-from-localhost-to-qa-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!