LNMP anti cross site cross directory security Settings only support PHP version 5.3.3 and above

  • 2020-05-06 12:07:22
  • OfStack

More than if you were a PHP 5.3.3 version, can modify/usr/local/php/etc/php ini to join in the end:

[HOST=www.jb51.net]
open_basedir=/home/wwwroot/www.jb51.net/:/tmp/
[PATH=/home/wwwroot/www.jb51.net]
open_basedir=/home/wwwroot/www.jb51.net/:/tmp/

According to the example of the above change, change your own domain name and directory, multiple sites as the above example to multiple, finally restart php - fpm: / etc/init d/php - fpm restart

If you want a website to be able to use a probe you need to add :/proc/
after /tmp/
For users of PHP 5.3.3 or above, cd /root can be executed; rm - f/root/vhost. sh; wget http: / / down. jb51. net lnmp/ext/vhost sh; chmod +x /root/ vhost.sh, so replace the original vhost.sh file, after adding the website will automatically add HOST anti-cross-site, cross-directory configuration.

Related articles: