简体   繁体   English

在Nginx上运行mimetex cgi二进制文件

[英]Run mimetex cgi binary on nginx

I switched to Nginx (from Apache) and now try to run mimetext to produce math terms as gif files. 我切换到Nginx(来自Apache),现在尝试运行mimetext以将数学术语生成为gif文件。 But it seems nginx does not have a cgi-bin support. 但是似乎nginx没有cgi-bin支持。

Some recommend to run apache on different port but i don't want to use apache anymore. 有人建议在不同的端口上运行apache,但是我不想再使用apache了。 It uses up to much memory, i have a lightweight vserver only and with nginx everything runs fine. 它使用了最多的内存,我只有一个轻量级的vserver,使用nginx时一切运行正常。

Is there any other way to execute my mimetex cgi? 还有其他方法可以执行mimetex cgi吗?

On apache i used a simple php script which then used PHP curl to call http://localhost/cgi-bin/mimetex.cgi?[code] which then saves the result in a file, which then is openend with "imagegif". 在apache上,我使用了一个简单的php脚本,然后使用PHP curl调用了http://localhost/cgi-bin/mimetex.cgi?[code] ,然后将结果保存到一个文件中,该文件的结尾是“ imagegif”。 So my <img> tags simply point to that php script. 所以我的<img>标签只是指向该php脚本。 I would like to do the same using nginx. 我想使用nginx做同样的事情。 Is that possible. 那可能吗。 Seems to be a pain to run CGI stuff on nginx. 在nginx上运行CGI东西似乎很痛苦。

Installed fcgiwrap on my debian OS, which started the daemon, then set up the location block to /cgi-bin, created that folder on my root, put mimetex.cgi i previously compiled on that server. 在我的debian OS上安装了fcgiwrap,启动了守护程序,然后将位置块设置为/ cgi-bin,在我的根目录上创建了该文件夹,并将之前编译的mimetex.cgi放在该服务器上。 DONE. 完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM