在以 mod_php 形式运行 php 几年后,我想转到 fcgi。我的服务器上目前运行的是 gentoo linux。我已经将 php 设置为 fcgi,一切正常。
但有一个问题。我必须将 AP_DOC_ROOT 的路径从 /var/www 更改为 /home/www。在 ubuntu 上有一个类似 apache2-suexec-custom 的东西,但我该如何在 gentoo 上做到这一点?还是我必须自己重新编译 apache?
答案1
好的,我刚刚找到了解决方案。有一个可以设置的选项/环境变量:
* You can manipulate several configure options of suexec
* through the following environment variables:
*
* SUEXEC_SAFEPATH: Default PATH for suexec (default: '/usr/local/bin:/usr/bin:/bin')
* SUEXEC_LOGFILE: Path to the suexec logfile (default: '/var/log/apache2/suexec_log')
* SUEXEC_CALLER: Name of the user Apache is running as (default: apache)
* SUEXEC_DOCROOT: Directory in which suexec will run scripts (default: '/var/www')
* SUEXEC_MINUID: Minimum UID, which is allowed to run scripts via suexec (default: 1000)
* SUEXEC_MINGID: Minimum GID, which is allowed to run scripts via suexec (default: 100)
* SUEXEC_USERDIR: User subdirectories (like /home/user/html) (default: public_html)
* SUEXEC_UMASK: Umask for the suexec process (default: 077)