If we careless compile, we can easily produced the error:
cc: error: –DSOMETHING="xyz": No such file or directoryWhich really not makes sense at all.
Actually, it maybe some switches is not supported, or the value is not correctly quoted.
I made it worked with Nginx by using fcgiwrap
location ~ ^/tex.cgi$ {Complie:
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include fastcgi_params;
}
cc mathtex.c -o tex.cgi -DDVIPNG=\"/usr/bin/dvipng\" -DLATEX=\"/usr/bin/latex\" -DCACHE=\"cache\/\" DWORK=\"cache\/\"
The most important switches are DCACHE (set up relative cache dir) and DWORK (set up temporary place for the CGI works). They should both writable by the script tex.cgi under fcgiwrap's run user.
Then place stuff using at this structure:
/public
/cache
tex.cgi
No comments:
Post a Comment
New comment