开启独立日志.

Signed-off-by: HITSword <admin@huayizhiyun.com>
master
HITSword 2020-01-09 15:54:51 +08:00
parent 9f50b69cc4
commit d130bedea6
1 changed files with 6 additions and 12 deletions

View File

@ -97,11 +97,6 @@ function hyproxy_make($server_name){//done
server_name %s;
index %s;
#error_page
location /ErrorPages/ {
alias /home/wwwroot/index/etc/html/ErrorPages/;
}
location / {
default_type text/html;
proxy_cache hyproxy;
@ -117,7 +112,9 @@ function hyproxy_make($server_name){//done
location ~ /purge(/.*){
proxy_cache_purge hyproxy $scheme://$host$1$is_args$args;
}
}',$value['server_name'],$value['index'],$value['header_host'],$value['proxy_pass']);
access_log /usr/local/nginx/logs/%s.access.log combined; #access_log end
error_log /usr/local/nginx/logs/%s.error.log crit; #error_log end
}',$value['server_name'],$value['index'],$value['header_host'],$value['proxy_pass'],$value['server_name'],$value['server_name']);
} else {
$nginx = sprintf('server {
listen 80;
@ -125,11 +122,6 @@ function hyproxy_make($server_name){//done
server_name %s;
index %s;
#error_page
location /ErrorPages/ {
alias /home/wwwroot/index/etc/html/ErrorPages/;
}
location / {
default_type text/html;
proxy_set_header X-Real-IP $remote_addr;
@ -137,7 +129,9 @@ function hyproxy_make($server_name){//done
proxy_set_header Host %s;
proxy_pass %s;
}
}',$value['server_name'],$value['index'],$value['header_host'],$value['proxy_pass']);
access_log /usr/local/nginx/logs/%s.access.log combined; #access_log end
error_log /usr/local/nginx/logs/%s.error.log crit; #error_log end
}',$value['server_name'],$value['index'],$value['header_host'],$value['proxy_pass'],$value['server_name'],$value['server_name']);
}
if ($value['status']=='start') {
$filebytes = file_put_contents(_HYCONF.$value['server_name'].'.conf', $nginx); //写入内容