diff --git a/conf/httpd-vhosts-lamp.conf b/conf/httpd-vhosts-lamp.conf index 4ef843c6..a200abfb 100644 --- a/conf/httpd-vhosts-lamp.conf +++ b/conf/httpd-vhosts-lamp.conf @@ -26,7 +26,7 @@ ServerAdmin webmaster@example.com DocumentRoot "/home/wwwroot/default" ServerName www.lnmp.org ErrorLog "/home/wwwlogs/IP-error_log" -CustomLog "/home/wwwlogs/IP-access_log" common +CustomLog "/home/wwwlogs/IP-access_log" combined SetOutputFilter DEFLATE Options FollowSymLinks diff --git a/conf/httpd-vhosts-lnmpa.conf b/conf/httpd-vhosts-lnmpa.conf index f7e1e4ed..5dba6001 100644 --- a/conf/httpd-vhosts-lnmpa.conf +++ b/conf/httpd-vhosts-lnmpa.conf @@ -26,7 +26,7 @@ ServerAdmin webmaster@example.com DocumentRoot "/home/wwwroot/default" ServerName www.lnmp.org ErrorLog "/home/wwwlogs/IP-error_log" -CustomLog "/home/wwwlogs/IP-access_log" common +CustomLog "/home/wwwlogs/IP-access_log" combined SetOutputFilter DEFLATE Options FollowSymLinks diff --git a/conf/lamp b/conf/lamp index cee6b7be..39b78da6 100644 --- a/conf/lamp +++ b/conf/lamp @@ -173,9 +173,8 @@ Add_VHost() if [ "${al_name}" = "" ]; then al_name="${domain}" fi - al="access_log /home/wwwlogs/${al_name}.log access;" - echo "You access log filename: ${al_name}.log" + echo "You access log filename: /home/wwwlogs/${al_name}-access_log" fi ServerAdmin="" @@ -231,7 +230,7 @@ php_admin_value open_basedir "${vhostdir}:/tmp/:/var/tmp/:/proc/" DocumentRoot "${vhostdir}" ServerName ${domain} ErrorLog "/home/wwwlogs/${al_name}-error_log" -CustomLog "/home/wwwlogs/${al_name}-access_log" common +CustomLog "/home/wwwlogs/${al_name}-access_log" combined SetOutputFilter DEFLATE Options FollowSymLinks @@ -244,8 +243,8 @@ CustomLog "/home/wwwlogs/${al_name}-access_log" common eof if [ "${access_log}" == 'n' ]; then - sed -i 's/ErrorLog/#ErrorLog/g' /usr/local/apache/conf/vhost/${domain}.conf - sed -i 's/CustomLog/#CustomLog/g' /usr/local/apache/conf/vhost/${domain}.conf + sed -i 's/^ErrorLog/#ErrorLog/g' /usr/local/apache/conf/vhost/${domain}.conf + sed -i 's/^CustomLog/#CustomLog/g' /usr/local/apache/conf/vhost/${domain}.conf fi if [ "${add_more_domainame}" == 'y' ]; then diff --git a/conf/lnmp b/conf/lnmp index 65fa1b29..e724b13a 100644 --- a/conf/lnmp +++ b/conf/lnmp @@ -205,7 +205,7 @@ Add_VHost() if [ "${al_name}" = "" ]; then al_name="${domain}" fi - al="access_log /home/wwwlogs/${al_name}.log access;" + al="access_log /home/wwwlogs/${al_name}.log;" echo "You access log filename: ${al_name}.log" fi diff --git a/conf/lnmpa b/conf/lnmpa index 185b0ca7..e41620b1 100644 --- a/conf/lnmpa +++ b/conf/lnmpa @@ -178,7 +178,7 @@ Add_VHost() if [ "${al_name}" = "" ]; then al_name="${domain}" fi - al="access_log /home/wwwlogs/${al_name}.log access;" + al="access_log /home/wwwlogs/${al_name}.log;" echo "You access log filename: ${al_name}.log" fi @@ -270,7 +270,7 @@ php_admin_value open_basedir "${vhostdir}:/tmp/:/var/tmp/:/proc/" DocumentRoot "${vhostdir}" ServerName ${domain} ErrorLog "/home/wwwlogs/${al_name}-error_log" -CustomLog "/home/wwwlogs/${al_name}-access_log" common +CustomLog "/home/wwwlogs/${al_name}-access_log" combined SetOutputFilter DEFLATE Options FollowSymLinks diff --git a/conf/nginx.conf b/conf/nginx.conf index 7037851a..96feff9e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -55,11 +55,7 @@ http ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section. server_tokens off; - #log format - log_format access '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" $http_x_forwarded_for'; - access_log off; + access_log off; server { @@ -93,7 +89,7 @@ server deny all; } - access_log /home/wwwlogs/access.log access; + access_log /home/wwwlogs/access.log; } include vhost/*.conf; } diff --git a/conf/nginx_a.conf b/conf/nginx_a.conf index 9d25492a..3f506dcd 100644 --- a/conf/nginx_a.conf +++ b/conf/nginx_a.conf @@ -55,11 +55,7 @@ http ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section. server_tokens off; - #log format - log_format access '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" $http_x_forwarded_for'; - access_log off; + access_log off; server { @@ -93,7 +89,7 @@ server deny all; } - access_log /home/wwwlogs/access.log access; + access_log /home/wwwlogs/access.log; } include vhost/*.conf; }