Giter Site home page Giter Site logo

apache2.2.x-mod_encoding's Introduction

apache2.2.x-mod_encoding

How to compile the apache2.2.x's mod_encoding? Here it is.

Download the original files

mod_encoding-20021209.tar.gz
mod_encoding.c.apache2.20040616
mod_encoding.c-apache2.2-20060520.patch

Unpack & Replace & Patch

  • Unpack:

      $ tar -xzf mod_encoding-20021209.tar.gz
    
  • Replace with .c file for apache2.2.x (as the older file for apache1.3):

      $ cd mod_encoding-20021209
      $ cp ../mod_encoding.c.apache2.20040616 mod_encoding.c
    
  • Patch:

      $ patch -p0 < ../mod_encoding.c-apache2.2-20060520.patch
    

Build & Install mod_encoding

  • Compile iconv-hook

      $ cd lib
      $ ./configure --prefix=/usr
      $ make
    
  • Install apxs tool for building apache modules:

      $ yum install httpd-devel.x86_64
    

Then, we get apxs at:/usr/sbin/apxs

  • Build & install mod_encoding.so

      $ ./configure --with-apxs=/usr/sbin/apxs --with-iconv-hook=/usr/include
      $ make
      $ gcc -shared -o mod_encoding.so mod_encoding.o -Wc,-Wall -Llib -liconv_hook
      $ cp mod_encoding.so /etc/httpd/modules/
    

Config & Restart apache2.2.x

  • Find lines in file httpd.conf for loading apache modules, add a line:

      LoadModule encoding_module modules/mod_encoding.so
    
  • Inner the right VirtualHost directive of that file, add lines:

      <IfModule mod_encoding.c>
      	EncodingEngine on
      	NormalizeUsername on
      	SetServerEncoding GBK
      	DefaultClientEncoding UTF-8 GBK GB2312
      </IfModule>
    
  • Restart apache

      sudo service httpd stop
      sudo service httpd start
    

Original authors' marvelous works

http://webdav.todo.gr.jp/download/mod_encoding-20021209.tar.gz http://webdav.todo.gr.jp/download/experimental/mod_encoding.c.apache2.20040616 http://www.aconus.com/~oyaji/faq/mod_encoding.c-apache2.2-20060520.patch

apache2.2.x-mod_encoding's People

Contributors

zsjforcn avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.