docker容器内运行的宝塔,php站点因为开启了防止跨站防跨站攻击(open_basedir)而导致不能访问
2021/06/19 10:57:14 [error] 1046#0: *1 open() "/www/wwwroot/www.i9bao.cn/favicon.ico" failed (2: No such file or directory), client: 172.17.0.1, server: www.i9bao.cn, request: "GET /favicon.ico HTTP/2.0", host: "www.i9bao.cn", referrer: "https://www.i9bao.cn/"
2021/06/19 12:39:26 [error] 111#0: *27 open() "/www/wwwroot/www.i9bao.cn/public/admin/index/login" failed (2: No such file or directory), client: 172.17.0.1, server: www.i9bao.cn, request: "GET /admin/index/login HTTP/2.0", host: "www.i9bao.cn", referrer: "http://127.0.0.1:8888/"
2021/06/19 12:39:26 [error] 111#0: *27 open() "/www/wwwroot/www.i9bao.cn/public/favicon.ico" failed (2: No such file or directory), client: 172.17.0.1, server: www.i9bao.cn, request: "GET /favicon.ico HTTP/2.0", host: "www.i9bao.cn", referrer: "https://www.i9bao.cn/admin/index/login"
2021/06/19 12:44:08 [error] 111#0: *31 open() "/www/wwwroot/www.i9bao.cn/public/admin" failed (2: No such file or directory), client: 172.17.0.1, server: www.i9bao.cn, request: "GET /admin HTTP/2.0", host: "www.i9bao.cn"
2021/06/19 12:44:11 [error] 111#0: *31 open() "/www/wwwroot/www.i9bao.cn/public/admin/index/login" failed (2: No such file or directory), client: 172.17.0.1, server: www.i9bao.cn, request: "GET /admin/index/login HTTP/2.0", host: "www.i9bao.cn"
2021/06/20 15:48:28 [error] 1053#0: *3 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/www/wwwroot/www.i9bao.cn/index.php) is not within the allowed path(s): (/www/wwwroot/i9bao-web/:/tmp/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Unable to open primary script: /www/wwwroot/www.i9bao.cn/index.php (Operation not permitted)" while reading response header from upstream, client: 172.17.0.1, server: www.i9bao.cn, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.i9bao.cn"
2021/06/20 15:49:55 [error] 1068#0: *5 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/www/wwwroot/www.i9bao.cn/index.php) is not within the allowed path(s): (/www/wwwroot/i9bao-web/:/tmp/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Unable to open primary script: /www/wwwroot/www.i9bao.cn/index.php (Operation not permitted)" while reading response header from upstream, client: 172.17.0.1, server: www.i9bao.cn, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.i9bao.cn"
2021/06/20 15:49:56 [error] 1068#0: *5 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/www/wwwroot/www.i9bao.cn/index.php) is not within the allowed path(s): (/www/wwwroot/i9bao-web/:/tmp/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Unable to open primary script: /www/wwwroot/www.i9bao.cn/index.php (Operation not permitted)" while reading response header from upstream, client: 172.17.0.1, server: www.i9bao.cn, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.i9bao.cn"
2021/06/20 15:49:56 [error] 1068#0: *5 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/www/wwwroot/www.i9bao.cn/index.php) is not within the allowed path(s): (/www/wwwroot/i9bao-web/:/tmp/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Unable to open primary script: /www/wwwroot/www.i9bao.cn/index.php (Operation not permitted)" while reading response header from upstream, client: 172.17.0.1, server: www.i9bao.cn, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.i9bao.cn"
2021/06/20 15:51:52 [error] 145#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/www/wwwroot/www.i9bao.cn/index.php) is not within the allowed path(s): (/www/wwwroot/i9bao-web/:/tmp/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Unable to open primary script: /www/wwwroot/www.i9bao.cn/index.php (Operation not permitted)" while reading response header from upstream, client: 172.17.0.1, server: www.i9bao.cn, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.i9bao.cn"
2021/06/20 15:55:53 [error] 145#0: *3 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/www/wwwroot/www.i9bao.cn/index.php) is not within the allowed path(s): (/www/wwwroot/i9bao-web/:/tmp/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Unable to open primary script: /www/wwwroot/www.i9bao.cn/index.php (Operation not permitted)" while reading response header from upstream, client: 172.17.0.1, server: www.i9bao.cn, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.i9bao.cn"
勾除了对防止跨站攻击open_basedir后,本地测试的i9bao站能正常访问了,而且再次勾选open_basedir,不影响访问