Skip to content

Commit be21c6f

Browse files
committed
up log_format.conf with warning about variables in a logs path
time spent: 0.5
1 parent f4971d0 commit be21c6f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Also I don't agree with nginx microcache for every site, see known traps.
3434
So here I'm trying to put together all (my) good patterns and knowledges, and organize it as simple as possible in compare with complex examples above. So anyone will be able to copy this configs and get good nginx setup out of the box :)
3535

3636
Time track:
37-
- [Filipp Frizzy](https://github.com/Friz-zy/) 41.75h
37+
- [Filipp Frizzy](https://github.com/Friz-zy/) 42.25h
3838

3939
### Support
4040

conf.d/0-log_format.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ log_format detailed '$remote_addr - $remote_user [$time_local] '
2626
access_log /var/log/nginx/access.log main buffer=512k flush=1s;
2727

2828
# useful in usual vm setup for splitting host's logs
29-
# but I prefer configuring it in server blocks
29+
# but it should be configured in each server block
30+
# access_log /var/log/nginx/{{ site }}-access.log main buffer=512k flush=1s;
31+
# error_log /var/log/nginx/{{ site }}-error.log error;
32+
33+
# another case: use variable in a path,
34+
# but this will work only for access log path
35+
# and can be targeted by attacker
3036
# access_log /var/log/nginx/$host-access.log main buffer=512k flush=1s;
31-
# error_log /var/log/nginx/$host-error.log warn;

0 commit comments

Comments
 (0)