Linode Forum Index Linode Forum
Linode Community Forums
 


nginx, php and perl, oh my!

Click here to go to the original topic

 
       Linode Forum Index -> General Discussion
Author Message
geoff2



Joined: 21 May 2009
Posts: 12

Posted: Thu Jun 25, 2009 2:04 pm    Post subject: nginx, php and perl, oh my!  

Hey there:

I'm pretty much a n00b, but I have managed to get a server up and running with nginx/php and other fun services such as postfix/dovecot, etc. I'm using Ubuntu 8.10.

I'm using spawn-fcgi to manage php processes from nginx. And that works fine. However, I'm having a tremendously difficult time figuring out how to get perl scripts running from the web browser. The nginx end of things I can probably figure out; what I don't understand, though, is what process I should be running to receive the requests from nginx to execute perl scripts, and how I should get that process running, and under what permission. The most I've accomplished is compiling and installing fcgiwrap, but I'm now stuck.

I realize more details would probably be helpful to get an answer to my question, but I'm not sure what additional details are necessary! Thanks in advance.

- geoff
Back to top  
hybinet



Joined: 02 May 2008
Posts: 971

Posted: Thu Jun 25, 2009 4:54 pm    Post subject:  

As you discovered, nginx has no native support for plain old CGI. If fcgiwrap doesn't work for you (for whatever reason), you'll have to proxy the request to another server that does support CGI. Actually that might be a lot simpler than compiling an nginx module and trying to troubleshoot it.

I'd recommend that you run lighttpd on an internal port (e.g. 127.0.0.1:8080) and handle CGI requests with that.

http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCGI
Back to top  
geoff2



Joined: 21 May 2009
Posts: 12

Posted: Thu Jun 25, 2009 8:25 pm    Post subject:  

Thanks -- I actually figured out how to initiate fcgiwrap and get nginx to send the requests over there, so I don't have to resort to your options.

From what I understand, the performance isn't going to rock, but my goal was just to be able to run a few one-off scripts that my wife and I made to do some odd tasks. Thanks for the suggestions, though.
Back to top  
 
       Linode Forum Index -> General Discussion
Page 1 of 1