FreeBSD Bugzilla – Attachment 171499 Details for
Bug 195916
www/nginx: compiled-in error log location is littering /var/log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Consolidate nginx logs under /var/log/nginx/
www_nginx.patch (text/plain), 4.01 KB, created by
VK
on 2016-06-17 02:43:03 UTC
(
hide
)
Description:
Consolidate nginx logs under /var/log/nginx/
Filename:
MIME Type:
Creator:
VK
Created:
2016-06-17 02:43:03 UTC
Size:
4.01 KB
patch
obsolete
>Index: www/nginx/Makefile >=================================================================== >--- www/nginx/Makefile (revision 416990) >+++ www/nginx/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= nginx > PORTVERSION= 1.10.1 >+PORTREVISION= 1 > PORTEPOCH= 2 > CATEGORIES= www > MASTER_SITES= http://nginx.org/download/ >@@ -244,13 +245,13 @@ > .endif > > NGINX_VARDIR?= /var >-NGINX_LOGDIR?= ${NGINX_VARDIR}/log >+NGINX_LOGDIR?= ${NGINX_VARDIR}/log/nginx > NGINX_RUNDIR?= ${NGINX_VARDIR}/run > NGINX_TMPDIR?= ${NGINX_VARDIR}/tmp/nginx > HTTP_PORT?= 80 > >-NGINX_ACCESSLOG?= ${NGINX_LOGDIR}/nginx-access.log >-NGINX_ERRORLOG?= ${NGINX_LOGDIR}/nginx-error.log >+NGINX_ACCESSLOG?= ${NGINX_LOGDIR}/access.log >+NGINX_ERRORLOG?= ${NGINX_LOGDIR}/error.log > > CONFLICTS?= nginx-devel-1.* > USE_RC_SUBR= nginx >@@ -503,7 +504,7 @@ > .endif > > .if ${PORT_OPTIONS:MHTTP_JSON_STATUS} >-NGINX_JSON_STATUS_VERSION= 1d2f303 >+NGINX_JSON_STATUS_VERSION= 1d2f303 > GH_ACCOUNT+= nginx-modules:json_status > GH_PROJECT+= ngx_http_json_status_module:json_status > GH_TAGNAME+= ${NGINX_JSON_STATUS_VERSION}:json_status >@@ -653,7 +654,7 @@ > .endif > > .if ${PORT_OPTIONS:MHTTP_UPLOAD} >-GIT_UPLOAD_VERSION= aba1e3f34c >+GIT_UPLOAD_VERSION= aba1e3f34c > GH_ACCOUNT+= vkholodkov:upload > GH_PROJECT+= nginx-upload-module:upload > GH_TAGNAME+= ${GIT_UPLOAD_VERSION}:upload >@@ -1103,7 +1104,7 @@ > EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-calio-iconv-nginx-module-config > .endif > >-PLIST_SUB+= NGINX_TMPDIR=${NGINX_TMPDIR} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} >+PLIST_SUB+= NGINX_TMPDIR=${NGINX_TMPDIR} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} NGINX_LOGDIR=${NGINX_LOGDIR} > > USERS?= ${WWWOWN} > GROUPS?=${WWWGRP} >@@ -1133,7 +1134,8 @@ > > post-patch: > @${REINPLACE_CMD} 's!%%HTTP_PORT%%!${HTTP_PORT}!; \ >- s!%%PREFIX%%!${PREFIX}!' \ >+ s!%%PREFIX%%!${PREFIX}!; \ >+ s!%%NGINX_ERRORLOG%%!${NGINX_ERRORLOG}!' \ > ${WRKSRC}/conf/nginx.conf > .if ${PORT_OPTIONS:MHTTP_ACCESSKEY} > @${REINPLACE_CMD} \ >@@ -1239,6 +1241,7 @@ > ${MKDIR} ${STAGEDIR}${MODULESDIR} > .endif > ${MKDIR} ${STAGEDIR}${NGINX_TMPDIR} >+ ${MKDIR} ${STAGEDIR}${NGINX_LOGDIR} > ${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${STAGEDIR}${PREFIX}/sbin > .for i in koi-utf koi-win win-utf > ${INSTALL_DATA} ${WRKSRC}/conf/${i} ${STAGEDIR}${ETCDIR} >Index: www/nginx/files/patch-conf-nginx.conf >=================================================================== >--- www/nginx/files/patch-conf-nginx.conf (revision 416990) >+++ www/nginx/files/patch-conf-nginx.conf (working copy) >@@ -1,6 +1,24 @@ >---- conf/nginx.conf.orig Thu Jan 18 10:08:18 2007 >-+++ conf/nginx.conf Thu Jun 14 12:57:52 2007 >-@@ -33,7 +33,7 @@ >+--- conf/nginx.conf.orig 2016-05-31 13:47:01 UTC >++++ conf/nginx.conf >+@@ -2,9 +2,14 @@ >+ #user nobody; >+ worker_processes 1; >+ >+-#error_log logs/error.log; >+-#error_log logs/error.log notice; >+-#error_log logs/error.log info; >++# This default error log path is compiled-in to make sure configuration parsing >++# errors are logged somewhere, especially during unattended boot when stderr >++# isn't normally logged anywhere. This path will be touched on every nginx >++# start regardless of error log location configured here. See >++# https://trac.nginx.org/nginx/ticket/147 for more info. >++# >++#error_log %%NGINX_ERRORLOG%%; >++# >+ >+ #pid logs/nginx.pid; >+ >+@@ -33,7 +38,7 @@ http { > #gzip on; > > server { >@@ -9,7 +27,7 @@ > server_name localhost; > > #charset koi8-r; >-@@ -41,7 +41,7 @@ >+@@ -41,7 +46,7 @@ http { > #access_log logs/host.access.log main; > > location / { >@@ -18,7 +36,7 @@ > index index.html index.htm; > } > >-@@ -51,7 +51,7 @@ >+@@ -51,7 +56,7 @@ http { > # > error_page 500 502 503 504 /50x.html; > location = /50x.html { >Index: www/nginx/pkg-plist >=================================================================== >--- www/nginx/pkg-plist (revision 416990) >+++ www/nginx/pkg-plist (working copy) >@@ -15,4 +15,5 @@ > %%WWWDATA%%@unexec if [ -L %D/www/nginx ]; then rm -f %D/www/nginx; fi > sbin/nginx > @dir %%NGINX_TMPDIR%% >+@dir %%NGINX_LOGDIR%% > man/man8/nginx.8.gz
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 195916
:
158076
|
163668
|
170746
|
171499
|
174411