php - Nginx setting open_basedir cross-site restriction problem
習慣沉默
習慣沉默 2017-05-16 12:03:05
0
1
753

I made the following configuration in nginx based on the Nginx configuration code provided online:

fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";

But I found that it can be set up on Amazon EC2, but not on Tencent Cloud. The Amazon EC2 Lnmp environment uses the https://lnmp.org/ one-click environment package, and Tencent Cloud compiles and installs it by itself.

Using phpinfo() to print the open_basedir displayed on Amazon EC are all valuable, but the ones configured on Tencent Cloud are all no value

But it can be configured in php.ini. I really can’t figure it out. I changed it to restart and it also restarted.

Is it a problem with the Nginx version? Amazon's Nginx version is 1.10, and Tencent Cloud's Nginx version is 1.12.

習慣沉默
習慣沉默

reply all(1)
漂亮男人

nginx:

set php open_basedir

fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; (The following directories can be set by yourself, such as open_basedir=/home/wwww/:/tmp/, etc.)

php:
Restricted directory: open_basedir =/var/www/sina/:/var/www/wangyi/:/var/www/logs/session/. If it is apache, you can use php_admin_value open_basedir to limit

These are the standard, correct settings. If the relevant VPS cloud is not working, it should be because of the server, it is restricted or something happened.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template