azev
V2EX  ›  问与答

nginx 里多个站点时,日志是每个网站单独设置?

  •  
  •   azev · Jun 30, 2019 · 2307 views
    This topic created in 2705 days ago, the information mentioned may be changed or developed.

    是 /var/log/nginx/sina/access.log 还是 /var/log/nginx/sina.access.log 还是 /usr/local/sina/log/access.log

    6 replies  •  2019-06-30 14:39:02 +08:00
    lhx2008
    lhx2008
    Jun 30, 2019
    1
    设置了就挂到设置的,没设置就用上层的
    jugelizi
    jugelizi
    Jun 30, 2019
    2
    最好分开
    省得后面还要拆
    azev
    azev
    OP
    Jun 30, 2019
    3
    @jugelizi 多谢
    那种做法比较好呢?
    1./var/log/nginx/sina/access.log
    2./var/log/nginx/sina.access.log
    3./usr/local/sina/log/access.log
    dot2017
    dot2017
    Jun 30, 2019
    4
    域名.access.log
    msg7086
    msg7086
    Jun 30, 2019
    5
    /var/log/nginx/域名.access.log
    然后开 logrotate 的 dateext,保留两个月。
    regist
    regist
    Jun 30, 2019
    6
    用的 docker,没有分网站,直接输出到一个文件。
    后面再单独分析。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1050 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 18:41 · PVG 02:41 · LAX 10:41 · JFK 13:41
    ♥ Do have faith in what you're doing.