首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >403‘.’,但没有别的

403‘.’,但没有别的
EN

Stack Overflow用户
提问于 2014-12-22 17:56:15
回答 1查看 2.7K关注 0票数 2

我有一个数字的海洋液滴,我有一个测试页面在网站的根部,它工作得很好,但是当我试图连接到laravel项目时,它用403个禁止的错误击中了我。

基本上,如果我去:

代码语言:javascript
复制
mysite.com/

它显示的是普通页面。

如果我去:

代码语言:javascript
复制
mysite.com/public

它给我看了403 error

我尝试过使用chmod -R 755 app/storage更改权限,甚至试图更改整个文件夹/目录的权限,但没有任何效果。

下面是错误日志的最后一部分:

代码语言:javascript
复制
2014/12/22 11:13:02 [error] 14447#0: *1 directory index of "/var/www/mysite.com/public_html/" is forbidden, client: 41.150.139.252, server: mysite.com, request$
2014/12/22 11:13:07 [error] 14447#0: *2 directory index of "/var/www/mysite.com/public_html/" is forbidden, client: 41.150.139.252, server: mysite.com, request$
2014/12/22 11:15:29 [emerg] 14465#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to [::]:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to [::]:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to [::]:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to [::]:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: bind() to [::]:80 failed (98: Address already in use)
2014/12/22 11:15:29 [emerg] 14465#0: still could not bind()
2014/12/22 11:16:14 [error] 14447#0: *3 directory index of "/var/www/mysite.com/public_html/" is forbidden, client: 41.150.139.252, server: mysite.com, request$
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-12-22 19:00:12

根据你在评论中的反应,我认为对于这些东西在哪里和你期望它在哪里有一种脱节。

您说:“目录是/var/www/mysite.com,laravel直接安装在那里。”

所以我会期待这样的事情:

代码语言:javascript
复制
/var/www/mysite.com/
    app/
    public/
    vendor/
    etc...

然后您说:“webserver根目录被设置为/var/www/mysite.com/public_html/

因此,当您在浏览器中访问mysite.com时,它指向/var/www/mysite.com/public_html/mysite.com/public指向/var/www/mysite.com/public_html/public/,这似乎不像您想要的那样。

/var/www/mysite.com/public/ 尝试将web服务器根目录更改为指向(Laravel的"public“dir).

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27607960

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档