求解 : lnmt集成环境wwwroot/default 里面的index.html界面可以访问,但是war包 包403错误

caiyuen 2018-03-16 02:25:22
求解 lnmt集成环境下/data/wwwroot/default 里面的index.html界面可以访问,但是放进去的war包访问时 报
Forbidden
You don't have permission to access / on this server.

war包由IDEA打包,页面都在web-inf下

ngnix日志:

2018/03/16 11:59:00 [crit] 1936#0: *216 open() "/data/wwwroot/default/" failed (13: Permission denied), client: 123.151.43.110, server: _, request: "GET / HTTP/1.1", host: "123.206.96.12"
2018/03/16 11:59:00 [crit] 1936#0: *217 open() "/data/wwwroot/default/" failed (13: Permission denied), client: 123.151.43.110, server: _, request: "GET / HTTP/1.1", host: "123.206.96.12"

apache日志:

[Fri Mar 16 13:52:01.116596 2018] [autoindex:error] [pid 3600:tid 2323585904] [client 123.151.43.110:11189] AH01276: Cannot serve directory /data/wwwroot/default/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

apache httpd.conf配置:

<Directory />
Options FollowSymLinks
AllowOverride none
Require all denied
</Directory>

DocumentRoot "/data/wwwroot/default"
<Directory "/data/wwwroot/default">
Options Indexes FollowSymLinks ExecCGI
AllowOverride None
Require all granted
</Directory>

<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>

ngnix 部分配置:

server {
listen 80;
server_name _;
access_log /data/wwwlogs/access_nginx.log combined;
root /data/wwwroot/default;
index index.html index.htm index.php;
#error_page 404 /404.html;
#error_page 502 /502.html;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location / {
try_files $uri @apache;
}
location @apache {
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}
location ~ [^/]\.php(/|$) {
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}



...全文
845 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
caiyuen 2018-03-16
  • 打赏
  • 举报
回复
@aabbabababaa 还是不行
aabbabababaa 2018-03-16
  • 打赏
  • 举报
回复
AllowOverride? 把权限都打开,重启下服务看了。。。

23,116

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧