易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 4646|回复: 1
收起左侧

解决Apache日志"internal dummy connection"方法

[复制链接]
发表于 2018-9-2 13:59:09 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
' a1 L  A* u* H" Y" a

打开httpd.conf 9 W- i! |$ T+ M9 N8 B$ J' z, A) a
找到 CustomLog logs/access_log combined這一行

在前一行加入

SetEnvIf User-Agent "(internal dummy connection)" dontlog
  • 1$ m, ^$ ?2 b, t9 \: M2 U# Z7 W

然后改写CustomLog logs 這一行,改成下面這樣(在后面加上 env=!dontlog)

CustomLog logs/access_log combined env=!dontlog[root@controller httpd]# vim /etc/httpd/conf/httpd.conf
% o! Y" H& \" S' p    #
- O: P* P* O5 @) ^    # The location and format of the access logfile (Common Logfile Format).4 q- |4 k  d1 m, P% O* I
    # If you do not define any access logfiles within a <VirtualHost>& O8 a; z3 `+ ~6 e
    # container, they will be logged here.  Contrariwise, if you *do*
/ \' T6 [* y; E- n, P# k6 D- J; m    # define per-<VirtualHost> access logfiles, transactions will be
2 D" ~! S1 t0 K0 w+ {  K3 L0 v    # logged therein and *not* in this file.
2 e0 R% P/ \# m5 G/ Y! s    #/ v6 E$ j( G  K/ Q" O5 Z
    #CustomLog "logs/access_log" common' L% _1 H; \$ u# B% T* `! O5 D
    #
4 Q  g; R, X7 @1 Q( J/ X& p1 I+ h4 z) U$ M    # If you prefer a logfile with access, agent, and referer information: F, u- ]$ C0 i. s% X7 J2 o
    # (Combined Logfile Format) you can use the following directive.: K1 ~6 Y7 L* a# Q5 X
    #
! g9 q$ C* {2 G& u( n    SetEnvIf User-Agent "(internal dummy connection)" dontlog/ E4 [( H9 I5 v" M5 P
    CustomLog "logs/access_log" combined env=!dontlog
- s' b4 P" `5 ^7 \$ D% b" m
</IfModule>
! Z( N8 G. b1 E+ G) U  ?! Y" e# p<IfModule alias_module>+ K# A/ ]6 H# @. q

# `$ ^! ~( P" X) O/ I  \# f! g6 J重启apache (systemctl restart httpd.service) 生效
% G1 f( j' v6 ]! j% X+ [: V- d0 n9 w) R" t/ s
 楼主| 发表于 2018-9-2 14:12:14 | 显示全部楼层
cat /etc/httpd/conf.d/wsgi-keystone.conf * }- L/ w- q% U# Y6 d. Y" S- \
Listen controller:5000( j" M* J" v! x7 E0 p' M. M
Listen controller:35357$ i/ ^/ @  s. f7 }1 \4 w. i9 Q

- m0 S4 u1 y, Y. h* Y/ g$ K! ^" y+ \( v; q<VirtualHost *:5000>
+ X( u/ g% R) k8 n: W3 L# b    WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
( [' t0 j& S6 K5 C% T% M    WSGIProcessGroup keystone-public0 u' p& S% K. d7 p1 g
    WSGIScriptAlias / /usr/bin/keystone-wsgi-public
* _! u3 ]* \- j+ Q    WSGIApplicationGroup %{GLOBAL}" e/ R: @+ x+ c
    WSGIPassAuthorization On
; }; z& E. ~! W8 X    LimitRequestBody 114688. {$ y* C# u4 d6 h6 i! E
    <IfVersion >= 2.4>5 \$ o) y( m% q2 d( m! B
      ErrorLogFormat "%{cu}t %M"
8 |6 R8 P0 q9 V4 _% \, P    </IfVersion>
" x& r5 H: c: G3 y' C# F& ~    ErrorLog /var/log/httpd/keystone.log8 c2 u8 S7 p; B( F" ]
    SetEnvIf User-Agent "(internal dummy connection)" dontlog
. g, W* L+ K, M$ D* o4 M    CustomLog /var/log/httpd/keystone_access.log combined env=!dontlog5 s& M0 P. Y/ u- }; F# y3 r
% F) H: v# Q8 w' t
    <Directory /usr/bin>7 T8 k$ u% M6 `1 w- I- e
        <IfVersion >= 2.4>
& D4 o; t3 T3 ^$ `1 c. m            Require all granted4 f5 }, y) V: a' t$ W. W, W
        </IfVersion>& r, B# W; ^' }1 r
        <IfVersion < 2.4>
. F' F7 r2 y- D0 c, e4 u. Q            Order allow,deny, t0 y- l& T6 B6 b" B0 p
            Allow from all
4 ]$ P( Z+ L( O+ E# l        </IfVersion>
( _) O% K) _9 W6 H' U1 h; k    </Directory>! d: x7 f! h6 I( ^( J- J, s
</VirtualHost>6 P4 N; u! Z1 C. h
7 q! N7 [3 U% w" L% s5 `
<VirtualHost *:35357>0 }0 t  T7 i7 t9 k8 l6 b
    WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
. h* a# e3 e) Q3 V6 Y    WSGIProcessGroup keystone-admin( S9 H  k4 `" u
    WSGIScriptAlias / /usr/bin/keystone-wsgi-admin# I3 H5 y+ h9 Q( i' l8 n9 f
    WSGIApplicationGroup %{GLOBAL}. c* k0 E. a/ t, t: Y
    WSGIPassAuthorization On
# n0 O- d7 C) z4 }9 d% g8 a    LimitRequestBody 114688
! c4 m$ l, d/ e* M7 ?    <IfVersion >= 2.4>6 V) I* S# \; d
      ErrorLogFormat "%{cu}t %M", Q, B  A; s! \" {
    </IfVersion>) G( ?& ~/ X; |: F) L8 U
    ErrorLog /var/log/httpd/keystone.log
+ P$ Y8 ]3 b' c' Y! c. |7 d     SetEnvIf User-Agent "(internal dummy connection)" dontlog
& I0 e5 J3 b0 P    CustomLog /var/log/httpd/keystone_access.log combined env=!dontlog' g; o( t& ~3 E& s9 K( y

& P7 n+ B& P; ~+ F  _    <Directory /usr/bin>
  P( @0 v' i9 `  O& r" S5 Y. H        <IfVersion >= 2.4>9 e( b: V( }$ @( k. ]* A( o
            Require all granted$ |# i) r7 j. t* a& P# X+ Q" R
        </IfVersion># D9 ~2 j3 `( a5 C3 c8 E  s* T3 Q
        <IfVersion < 2.4>
0 {; v( S! q2 i, j4 X6 u            Order allow,deny
+ K0 _1 q. P* u" J/ Z            Allow from all' R1 d, ?: h% z3 P  H: s
        </IfVersion>
2 [+ V0 X/ x4 |1 K. S4 b    </Directory>
2 b% J  b1 J# r</VirtualHost>
. `' {# g6 S. r$ Z) i0 A7 Q
8 P$ s5 E% [3 w( @Alias /identity /usr/bin/keystone-wsgi-public4 t' {+ ]+ E; b5 Y9 ^5 f2 _
<Location /identity>
3 M$ ^1 Z: _# a  c3 ^    SetHandler wsgi-script" ]3 s! ~+ A" w
    Options +ExecCGI9 _1 l! A0 g0 P' l9 r& ]: g6 _

- I. i4 n- P: S) k/ ^    WSGIProcessGroup keystone-public
# R; ^- _" w% U1 r# u    WSGIApplicationGroup %{GLOBAL}$ g% [3 N% ]! t' r7 X( Q; `3 D
    WSGIPassAuthorization On8 y+ o7 z' ]: ?) t2 H- h
</Location>
2 K$ M9 h" k0 |' [: \$ y7 p2 M
0 k! Y. E. y3 bAlias /identity_admin /usr/bin/keystone-wsgi-admin  v/ K# v- g/ J/ j; P
<Location /identity_admin>2 f$ X# h9 U1 D
    SetHandler wsgi-script% H! j. M. K' l( @/ j  l
    Options +ExecCGI. {+ [' ?9 W) w1 X+ N

. j+ U( |; L$ n6 b% [5 e0 Y$ k7 ]    WSGIProcessGroup keystone-admin1 A" e. m4 o/ `; r+ G
    WSGIApplicationGroup %{GLOBAL}
3 a3 U9 @* ~! c/ I9 r) P    WSGIPassAuthorization On9 l. i  I0 ^: x/ b8 E0 ~
</Location>
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:37 , Processed in 0.050445 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表