skip menu and go to main content

body start

mod_url

Wiki

Project News

Project Info

activity viewforum,download view

Developer Info

프로젝트 소개


mod url은 파일 시스템의 인코딩과 브라우저에서 요청하는 URL 인코딩이 서로 다른 경우에 발생할 수 있는 문제점을 해결하기 위한 웹서버 모듈을 제공 합니다. 이 프로젝트는 현재 apache 1, apache 2, lighttpd 용 모듈을 제공하고 있습니다.

프로젝트 라이센스


mod_url의 license는 현재 각 웹서버의 License를 따릅니다. 그러므로 Apache 용 모듈의 경우 Apache License, Version 2.0를 따르면, lighttpd 용 모듈의 경우 BSD license를 따릅니다.

설치 방법


  • 설치 방법은 source 의 README 파일에 있는 내용을 옮겨 적은 것입니다. 빌드시에는 소스 안의 README 파일을 참조 하십시오.

  • Apache
    • 동적 빌드 (dynamic build)
      • apxs가 설치 되어 있어야 합니다. Redhat 계열에서 RPM으로 apache를 설치 하셨다면 apache-devel 또는 httpd-devel package가 필요 합니다.
        shell> apxs -i -c mod_url.c
        
        또는 소스 디렉토리에 GNUMakefile 이 존재 한다면
        
        shell> make
        


      • apache 용 mod_url은 mod_userdir module에 dependency가 있습니다. 만약 웹서버에 mod_userdir module이 없거나 또는 loading을 원치 않는다면 다음과 같이 constant를 지정해 주셔야 합니다.
        shell> apxs -i -c -DURL_NOUSERDIR mod_url.c
        
        또는 소스 디렉토리에 GNUMakefile 이 존재 한다면
        
        shell> make EXTRA_CFLAGS="-DURL_NOUSERDIR"
        


    • 정적 빌드 (static build)
      • apache1
        shell> cp -af mod_url.c /path/apache-src/modules/extra/
        shell> cd /path/apache-src
        shell> ./configure .... --add-module=modurl.c ...
        
        만약 mod_userdir 문제가 있다면
        
        shell> EXTRA_CFLAGS="-DURL_NOUSERDIR" ./configure ... --add-module=mod_url.c ..
        
      • apache2
        shell> cp -r mod_url/ /path/apache-src/src/modules/url
        shell> rm /path/apache-src/src/modules/url/GNUmakefile
        shell> cd /path/apache-src
        shell> ./configure .... --enable-modules=all ..
            or
        shell> ./configure --enable-url=shared ...
        


  • lighttpd
    • lighttpd는 현재 1.4.x 대의 모듈을 제공 합니다.

  • shell> cp -af mod_url.c /path/lighttpd-src/src/
    shell> cd /path/lighttpd-src
    shell> patch -p1 /some/path/mod_url-lighttpd-src/lighttpd-mod-url.patch
    shell> ./configurea
    shell> make
    shell> make install
    


설정


  • 설정 방법은 source 의 README 파일에 있는 내용을 옮겨 적은 것입니다. 설정시에는 소스 안의 README 파일을 참조 하십시오.

  • Apache
    LoadModule  userdir_module   modules/mod_userdir.so
    LoadModule  redurl_module    modules/mod_url.so
    
    <IfModule mod_url.c>
       CheckURL On
       ServerEncoding EUC-KR
       ClientEncoding UTF-8
    </IfModule>
    
    • mod_userdir 을 loading 할 경우, mod_url 보다 mod_userdir을 먼저 load 해야 합니다.
    • ServerEncoding의 경우 서버의 한글 파일 이름이 euc-kr charset으로 되어 있다면 euc-kr을 지정하고, utf-8로 되어 있다면 UTF-8로 지정 합니다.
    • ClientEncodingServerEncoding이 UTF-8이면 local charset을, local charset이면 UTF-8을 지정하면 됩니다.
    • 디렉토리별로 지정을 하고 싶을 경우에는 <Directory> 지시자를 이용할 수 있습니다.
      <Directory /path/some>
          <IfModule mod_url.c>
              CheckURL Off
          </IfModule>
      </Directory>
      


  • lighttpd
    • module load
      server.modules = (
          ....,
          "mod_url"
      )
      
    • configuration
      url.enabled = "enable"
      url.server_encoding = "euc-kr"
      url.client_encoding = "utf-8"