Apr 292011

I was asking to Evan Miller if his nginx mod_strip module can honour <textarea> tag. i got quick responses from him.
previous mod_strip module eliminates newline characters within <textarea> list contents. here’s examples with latest mod_strip. I’ve tested it using postfixadmin.


server {
         listen		xxx.xxx.xxx.xxx:80;
         server_name	www.example.com;
         strip		on;
         access_log	/var/log/nginx/www.example.com-access.log  main;

         location  / {
             proxy_set_header Host $host;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-Host $host;
             proxy_set_header X-Forwarded-Server $host;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Continue reading »

Apr 262011

Feel bored with black and white display nginx configuration? Evan Miller create Syntax highlighting for the world’s best text editor, vim.

nginx configuration syntax highlighting


Here’s the tutorial http://www.vim.org/scripts/script.php?script_id=1886, or this how i’ve made it work on mine.

First change to .vim directory on home directory, then create directory called syntax.

# cd .vim
# mkdir syntax
# cd syntax

Download latest nginx.vim to ~/.vim/syntax/
Create file called filetype.vim in .vim and then and then add this line.

au BufRead,BufNewFile /etc/nginx/* set ft=nginx

done. 😀