服务器配置后显示403,403由于服务器配置拒绝客户端而被禁止

我正处于启动Django webapp的最后阶段,我已经被难住了好几天,试图理解为什么我总是得到一个403禁止的错误(你没有权限访问/在这个服务器上)。当我检查错误日志时,输出的最后一部分如下:[Fri Sep 11 04:54:04.525052 2015] [:error] [pid 31126:tid 140413402863360] [client 104.156.102.54:62884] ImportError: No module named foodshop.settings

[Fri Sep 11 05:10:08.926570 2015] [mpm_event:notice] [pid 31122:tid 140413615802240] AH00491: caught SIGTERM, shutting down

[Fri Sep 11 05:10:09.912491 2015] [mpm_event:notice] [pid 31345:tid 139760551360384] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations

[Fri Sep 11 05:10:09.912511 2015] [core:notice] [pid 31345:tid 139760551360384] AH00094: Command line: '/usr/sbin/apache2'

[Fri Sep 11 05:10:15.259159 2015] [authz_core:error] [pid 31349:tid 139760274188032] [client 104.156.102.54:63064] AH01630: client denied by server configuration: /home/ubuntu/foodshop

[Fri Sep 11 05:15:00.604266 2015] [mpm_event:notice] [pid 31345:tid 139760551360384] AH00491: caught SIGTERM, shutting down

[Fri Sep 11 05:15:01.657535 2015] [mpm_event:notice] [pid 31455:tid 140370721130368] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations

[Fri Sep 11 05:15:01.657552 2015] [core:notice] [pid 31455:tid 140370721130368] AH00094: Command line: '/usr/sbin/apache2'

[Fri Sep 11 05:15:06.215273 2015] [authz_core:error] [pid 31458:tid 140370621613824] [client 104.156.102.54:63126] AH01630: client denied by server configuration: /home/ubuntu/foodshop

[Fri Sep 11 05:15:07.389851 2015] [authz_core:error] [pid 31458:tid 140370613221120] [client 104.156.102.54:63126] AH01630: client denied by server configuration: /home/ubuntu/foodshop

[Fri Sep 11 05:15:08.519875 2015] [authz_core:error] [pid 31458:tid 140370427979520] [client 104.156.102.54:63126] AH01630: client denied by server configuration: /home/ubuntu/foodshop

[Fri Sep 11 05:33:55.993127 2015] [mpm_event:notice] [pid 31455:tid 140370721130368] AH00491: caught SIGTERM, shutting down

[Fri Sep 11 05:33:56.047551 2015] [mpm_event:notice] [pid 31598:tid 140492520712064] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations

[Fri Sep 11 05:33:56.047572 2015] [core:notice] [pid 31598:tid 140492520712064] AH00094: Command line: '/usr/sbin/apache2'

[Fri Sep 11 05:34:01.575422 2015] [authz_core:error] [pid 31602:tid 140492306102016] [client 104.156.102.54:63348] AH01630: client denied by server configuration: /home/ubuntu/foodshop

[Fri Sep 11 05:34:02.481030 2015] [authz_core:error] [pid 31602:tid 140492297709312] [client 104.156.102.54:63348] AH01630: client denied by server configuration: /home/ubuntu/foodshop

[Fri Sep 11 05:34:03.342911 2015] [authz_core:error] [pid 31602:tid 140492289316608] [client 104.156.102.54:63348] AH01630: client denied by server configuration: /home/ubuntu/foodshop

需要注意的是…应用程序在我的本地主机上运行得很好。另外,我运行了sudo chown-rwww data apache2.conf将所有权更改为apache。我很乐意分享整个错误日志,如果它会更有用的话,但它很长。在

我在一个EC2实例(ubuntu14.04)上运行这个。在

你可以看到我的000-默认.conf文件如下:

^{pr2}$

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值