I follow the mathtex installation here http://www.forkosh.com/mathtex.html and have verified that it works on the unix server.
Now, according to the instruction, I just have to move the mathtex.cgi script to the /cgi-bin/ folder, chmod and it should work.
I mkdir the folder, move the cgi file there and chmod 755.
However, when I go directly to the cgi script using www.domain.com/cgi-bin/mathtex.cgi? instead of it showing the latex input/output, the browser just download the cgi file to my computer.
Any nginx expert can help letting me know if I have to do anything on the nginx.conf file?
Do I need to install fcgiwrap to server cgi or something?