求解 : lnmt集成环境wwwroot/default 里面的index.html界面可以访问,但是war包 包403错误
求解 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;
}