31 Aug 2010, 10:58pm
Projects:
by

leave a comment

  • Nginx With Gzip On Ubuntu Jaunty

    I just noticed that the latest version of Nginx available on Jaunty repositories was [1] the latest legacy version (0.6.x) instead of the latest stable version (0.7.x), and [2] not compiled with gzip compression enabled.

    To solve both problems, I had to compile Nginx from source with --with-http_gzip_static_module option. By default, Nginx would be installed at /usr/local. I would rather keep the locations consistent with those used in the precompiled packages from the repositories, so I ended up having to use the following configure options:

    ./configure \
    --prefix=/usr \
    --conf-path=/etc/nginx/nginx.conf \
    --error-log-path=/var/log/nginx/error.log \
    --pid-path=/var/run/nginx.pid \
    --lock-path=/var/lock/nginx.lock \
    --http-log-path=/var/log/nginx/access.log \
    --with-http_dav_module \
    --http-client-body-temp-path=/var/lib/nginx/body \
    --with-http_ssl_module \
    --http-proxy-temp-path=/var/lib/nginx/proxy \
    --with-http_stub_status_module \
    --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
    --with-debug \
    --with-http_flv_module \
    --with-http_gzip_static_module
    make
    sudo make install
    
    nginx path prefix: "/usr"
    nginx binary file: "/usr/sbin/nginx"
    nginx configuration prefix: "/etc/nginx"
    nginx configuration file: "/etc/nginx/nginx.conf"
    nginx pid file: "/var/run/nginx.pid"
    nginx error log file: "/var/log/nginx/error.log"
    nginx http access log file: "/var/log/nginx/access.log"
    nginx http client request body temporary files: "/var/lib/nginx/body"
    nginx http proxy temporary files: "/var/lib/nginx/proxy"
    nginx http fastcgi temporary files: "/var/lib/nginx/fastcgi"
    

    And voila.

    foo> nginx -v
    nginx version: nginx/0.7.67
    

    The gzip settings in my nginx.conf:

        gzip  on;
        gzip_http_version 1.1;
        gzip_vary on;
        gzip_comp_level 6;
        gzip_proxied any;
        gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
        gzip_buffers 16 8k;
    

    7 Aug 2010, 7:14pm
    Projects:
    by

    leave a comment

  • Node.js And CouchDB Installation On Ubuntu

    Just a quick gist of the script I’ve been using to install NodeJS and CouchDB on several Ubuntu boxes.

     

    Recent Posts

    Recent Comments

    • Cliffano Subagio: Good to hear about your opportunity to visit Japan, I’m sure you will have a great...
    • Kayla: I’m going to Japan for two week this summer. Our sister city is Tsubame, Japan and my school has an...
    • poseidonfu: thanks,Very effective
    • anonymous: I really enjoyed both the last lecture and the book. I don’t think that theres anyone that I look up...
    • dioni: The thing I hate about HK is how people shove and push in the queue. Can’t they be civilized?!! I kept...

    Most Commented Posts

    Linkroll