root zhumarin etc nginx cat etc nginx site_template conf set php_admin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
root@zhumarin /etc/nginx # cat /etc/nginx/site_template.conf
set $php_admin_value "";
set $php_value "";
# log_errors
set $php_admin_value "$php_admin_value \n log_errors=on";
# error_log
set $php_admin_value "$php_admin_value \n error_log=/home/$site_user/logs/$site_host/php.error_log";
# sendmail_path
set $php_admin_value "$php_admin_value \n sendmail_path=/usr/sbin/sendmail -t -i -f $site_user@$site_host";
# open_basedir
set $php_admin_value "$php_admin_value \n open_basedir=/home/$site_user";
# upload_tmp_dir
set $php_value "$php_value \n upload_tmp_dir=/home/$site_user/tmp/$site_host";
# session.save_path
set $php_value "$php_value \n session.save_path=/home/$site_user/tmp/$site_host";
# doc_root
set $php_value "$php_value \n doc_root=/home/$site_user/www/$site_host";
set $fast_cgi_pool "unix:/var/run/php-fpm.sock";
charset 'utf-8';
root "/home/$site_user/www/$site_host";
include /etc/nginx/php_fast_cgi.conf;