# Perl/CGI on Nginx?

**URL:** <https://www.ruby-forum.com/t/perl-cgi-on-nginx/245709>\
**Category:** NGINX\
**Created:** [July 8, 2013, 6:45pm UTC](https://www.ruby-forum.com/t/perl-cgi-on-nginx/245709 "2013-07-08T18:45:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [July 8, 2013, 6:45pm UTC](https://www.ruby-forum.com/t/perl-cgi-on-nginx/245709/1 "2013-07-08T18:45:58Z")

</div>

Hello everyone.

I’m running Nginx on OpenBSD. PHP works fine, but how can I add support  
to  
.pl and .cgi files for Nginx?

Many thanks.

---

<div class="post-metadata">

**Author:** ![BSD\_Kazakhstan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/439d5e/32.png) [@BSD\_Kazakhstan](https://www.ruby-forum.com/u/BSD_Kazakhstan)\
**Post date:** [July 8, 2013, 6:55pm UTC](https://www.ruby-forum.com/t/perl-cgi-on-nginx/245709/2 "2013-07-08T18:55:18Z")

</div>

On Mon, Jul 08, 2013 at 07:45:04PM +0300, BSD Kazakhstan wrote:

Hi there,

> I’m running Nginx on OpenBSD. PHP works fine, but how can I add support to  
> .pl and .cgi files for Nginx?

nginx doesn’t “do” php, pl, or cgi itself.

You must set up an external server to handle them, and configure nginx  
to talk to that external server.

Probably you have set up a fastcgi server which knows how to handle the  
php files, and you have configured nginx to “fastcgi\_pass” to that  
server  
for the appropriate urls.

You can do the same with pl and cgi files.

Or perhaps you can set up a http server which knows how to handle the  
“dynamic” files; in that case you would configure nginx to “proxy\_pass”  
to the external server.

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
