Apache HTTP Server Version 2.4

| ����: | ���� ������ �ܺ� ���α����� ó���� �� Ŭ���̾�Ʈ�� ������ | 
|---|---|
| ����: | Extension | 
| ����: | ext_filter_module | 
| �ҽ�����: | mod_ext_filter.c | 
mod_ext_filter�� ����ϸ� �����ϰ� �ͼ���
    ������� ������ ���� �� �ִ�.
    ǥ���Է¿��� �а� ǥ����¿� ���� ���α�(��, ���н���
    ���� ���ɾ�)�� ����ġ ���ͷ� ����� �� �ִ�. �̷� ���ʹ�
    ����ġ API�� �������� ����ġ ���� ���μ��� �ȿ��� ����Ǵ�
    ���Ϳ� ���� �ſ� ��������, ������ ���� ������ �ִ�:
���� ����ϱ�� ������ ����������,
    mod_ext_filter�� ����Ͽ� ���� ���� ����
    �� �ִ�.
        # mod_ext_filter ���þ ������
        # �ܺ� ���α� /usr/bin/enscript�� ����Ͽ�
        # �������ϰ� text/c ������ HTML�� ����� �����
        # type�� text/html�� �����ϴ� ���� �����Ѵ�
        ExtFilterDefine c-to-html mode=output \
        
          intype=text/c outtype=text/html \
          cmd="/usr/bin/enscript --color -W html -Ec -o - -"
        
        
        <Directory "/export/home/trawick/apacheinst/htdocs/c">
        
          # ��¿� ���ο� ���� �����ϴ� core ���þ�
          SetOutputFilter c-to-html
          
          # .c ������ type�� text/c�� ����� mod_mime
          # ���þ�
          AddType text/c .c
          
          # ����� ������ ������ ��û���� ���� ������
          # �˷��ִ� �α��� ����ϴ� mod_ext_filter
          # ���þ�
          ExtFilterOptions DebugLevel=1
        
        </Directory>
      
Note: �Ʒ� gzip ������ ���� ������ ���� �� ���̴�.
      ���� ���� ����Ϸ��� mod_deflate��
      �����ϱ� �ٶ���.
        # �ܺ� ���� �����ϴ� mod_ext_filter ���þ�
        ExtFilterDefine gzip mode=output cmd=/bin/gzip
        
        <Location /gzipped>
        
          # ����Ҷ� gzip ���� �����ϴ� core ���þ�
          SetOutputFilter gzip
          
          # "Content-Encoding: gzip" ����� �߰��ϴ�
          # mod_header ���þ�
          Header set Content-Encoding gzip
        
        </Location>
      
        # cat���� ��� ������ ����ϴ� ���� �����ϴ�
        # mod_ext_filter ���þ�; cat�� �ƹ��͵� ��������
        # �ʴ´�; ���� ó����θ� ��� �Ͽ� �ڿ��� �� �Ҹ��Ѵ�
        ExtFilterDefine slowdown mode=output cmd=/bin/cat \
        
          preservescontentlength
        
        
        <Location />
        
          # ����Ҷ� slowdown ���� ������ �����ϴ� core ���þ�
          #
          SetOutputFilter slowdown;slowdown;slowdown
        
        </Location>
      
        # ���信�� ���� ��ü�ϴ� ���� �����ϴ�
        # mod_ext_filter ���þ�
        #
        ExtFilterDefine fixtext mode=output intype=text/html \
        
          cmd="/bin/sed s/verdana/arial/g"
        
        
        <Location />
        
          # ����Ҷ� fixtext ���� �����ϴ� core ���þ�
          SetOutputFilter fixtext
        
        </Location>
      
        # ���� ������ �ִ� Ư�� Ŭ���̾�Ʈ(IP 192.168.1.31)��
        # ���� mod_deflate�� �а� ���� �ڷḦ �����Ѵ�.
        # �� ���ʹ� mod_deflate�� ������ �� �ڷḦ �����Ѵ�.
        ExtFilterDefine tracebefore \
        
          cmd="/bin/tracefilter.pl /tmp/tracebefore" \
          EnableEnv=trace_this_client
        
        
        # �� ���ʹ� mod_deflate���� ������ �ڷḦ �����Ѵ�.
        # ftype �Ķ���� ��������ʴ� ���, �⺻ ������
        # AP_FTYPE_RESOURCE�� ���� ������ mod_deflate *������*
        # �д�. AP_FTYPE_CONTENT_SET ���� ���� ���� ���ڰ���
        # �����ϸ� mod_deflate ���Ŀ� �����Ѵ�.
        ExtFilterDefine traceafter \
        
          cmd="/bin/tracefilter.pl /tmp/traceafter" \
          EnableEnv=trace_this_client ftype=21
        
        
        <Directory /usr/local/docs>
        
          SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
          SetOutputFilter tracebefore;deflate;traceafter
        
        </Directory>
      
        #!/usr/local/bin/perl -w
        use strict;
        
        open(SAVE, ">$ARGV[0]")
        
          or die "can't open $ARGV[0]: $?";
        
        
        while (<STDIN>) {
        
          print SAVE $_;
          print $_;
        
        }
        
        close(SAVE);
      
| ����: | �ܺ� ���� �����Ѵ� | 
|---|---|
| ����: | ExtFilterDefine filtername parameters | 
| ������: | �ּ������� | 
| ����: | Extension | 
| ���: | mod_ext_filter | 
ExtFilterDefine ���þ�� �ܺ�
    ������ ������ ������ ���α�, �ƱԸ�Ʈ�� �����Ѵ�.
filtername�� ������ ���� �̸��� �����Ѵ�. �� �̸��� SetOutputFilter ���þ�� ����Ѵ�. ����� ��� ���͵鰣�� �̸��� ��ġ�� �ȵȴ�. ���� ���͵�� API�� ������ �������� �ʴ´�. ���� ����ڴ� �̸��� ��ġ�� ������ ���� ���Ѵ�.
������ �ܺ� ���ɾ�� �ٸ� ������ �����ϴ� ������ �ƱԸ�Ʈ��
    � ������ ���͵� �����ϴ�. ��, cmd= �Ķ���ʹ�
    �ݵ�� �ʿ��ϴ�. ����� �� �ִ� �Ķ���ʹ� ������ ����:
cmd=cmdlinecmd= Ű����� ������ �ܺ� ���ɾ �����Ѵ�.
      ���α��� �ڿ� �ƱԸ�Ʈ�� �ִٸ� �������� �ֵ���ǥ��
      ����� �Ѵ� (���� ���,
      cmd="/bin/mypgm arg1
      arg2"). ���� ��ġ���ʰ� ���� ���α���
      �����ϱ���� �Ϲ����� �� ����ǥ�� �ʿ����. ���α�
      �ƱԸ�Ʈ���� �������� �����Ѵ�. ���α� �ƱԸ�Ʈ�� ������
      �ִٸ� ���� �տ� �齽������ ����ؾ� �Ѵ�. �齽������
      �ƱԸ�Ʈ�� �Ϻζ�� �齽������ �ι� ����ؾ� �Ѵ�. ���α���
      �����Ҷ� ǥ�� CGI ȯ�溯���� �߰��� DOCUMENT_URI,
      DOCUMENT_PATH_INFO, QUERY_STRING_UNESCAPED ������ �����Ѵ�.mode=modemode=output��
      ����Ѵ�. ��û�� ó���ϴ� ���ʹ� mode=input��
      ����Ѵ�. mode=input�� ����ġ 2.1�� �߰��Ǿ���.intype=imtintype=�� �����ϸ�
      �ٸ� type�� ������ ���ͷ� ó������ �ʴ´�.outtype=imtPreservesContentLengthPreservesContentLength Ű����� ���Ͱ�
      content length�� �����ϵ��� �Ѵ�. ��κ��� ���Ͱ� content
      length�� �����ϹǷ� �� Ű����� �⺻���� �ƴϴ�. ���Ͱ�
      ���̸� �����Ҷ��� �� Ű���带 ����ؾ� �Ѵ�.ftype=filtertypedisableenv=envenableenv=env| ����: | mod_ext_filter �ɼ��� �����Ѵ� | 
|---|---|
| ����: | ExtFilterOptions option [option] ... | 
| �⺻��: | ExtFilterOptions DebugLevel=0 NoLogStderr | 
| ������: | directory | 
| ����: | Extension | 
| ���: | mod_ext_filter | 
ExtFilterOptions ���þ��
    mod_ext_filter�� Ư���� ó���ɼ��� �����Ѵ�.
    Option�� ������ �ϳ���.
DebugLevel=nDebugLevel �����
        mod_ext_filter�� ����ϴ� ����� ����
        ������ ���Ѵ�. �⺻���� ������� ������� �ʴ´�.
        �̴� DebugLevel=0�� ����. ���� ���ڸ�
        ����Ҽ���, �� ���� ������� ��ϵǰ� ���� ������
        ��������. ���ڰ��� ���� �ǹ̴� mod_ext_filter.c
        �պκп� �ִ� DBGLVL_ ��� ���ǿ� �������ִ�.
        ����: ���� �α� ����Ϸ��� core ���þ� LogLevel�� ����Ͽ� �������
        ����ġ �����α� ����ؾ� �Ѵ�.
LogStderr | NoLogStderrLogStderr Ű����� �ܺ� ���� ���α���
      ǥ�ؿ����� ����ϴ� ������ ����ġ �����α� ����Ѵ�.
      NoLogStderr�� �� ����� ���� �ʴ´�.
      ExtFilterOptions LogStderr DebugLevel=0
    
���� ������ ����ϸ� ���Ͱ� ǥ�ؿ����� ����ϴ� ������
    ����ġ �����α� ����ϰ�, mod_ext_filter��
    ��ü ������� ������� �ʴ´�.