I also see LUA can do the job but i get the feeling i will hit a dead end if i did this. location /compress-images { content_by_lua 'os.execute("C:/server/bin/compress.exe")'; } Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252064,252183#msg-252183