D
D
Dmitry Amelchenko2020-11-06 13:40:02
Nginx
Dmitry Amelchenko, 2020-11-06 13:40:02

Is it possible to make php execution outside of webroot?

We set the task for the php script to run in the /home/deploy directory, where the site1.ru/public , site2.ru/public , site3.ru/public subdirectories are located (permissions are the same everywhere). Directly, if you run php site.ru/public/index.php everything works, but the browser does not work, for example in https://site1.ru/index.php . It is obvious that this is done for safety and where it should be turned off?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Amelchenko, 2020-11-09
@i1677960

fastcgi_param PHP_ADMIN_VALUE - here you can specify the open_basedir parameter, but this greatly reduces security

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question