# What's the substitute for the Apache's ScriptAlias

**URL:** <https://www.ruby-forum.com/t/whats-the-substitute-for-the-apaches-scriptalias/203530>\
**Category:** NGINX\
**Created:** [February 22, 2011, 10:27am UTC](https://www.ruby-forum.com/t/whats-the-substitute-for-the-apaches-scriptalias/203530 "2011-02-22T10:27:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 22, 2011, 10:27am UTC](https://www.ruby-forum.com/t/whats-the-substitute-for-the-apaches-scriptalias/203530/1 "2011-02-22T10:27:58Z")

</div>

For example:

ScriptAlias /cgi-bin/ “/home1/irteam/gaga/cgi-bin/”

I haven’t found the related directive to the “ScriptAlias” in Nginx.

Anyone can help me?

Thanks

Posted at Nginx Forum:

> **[What's the substitute for the Apache's ScriptAlias](https://forum.nginx.org/read.php?2,177424,177424#msg-177424)**
>
> For example: ScriptAlias /cgi-bin/ "/home1/irteam/gaga/cgi-bin/" I haven't found the related directive to the "ScriptAlias" in Nginx. Anyone can help me? Thanks

---

<div class="post-metadata">

**Author:** ![sunjipeng\_neu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@sunjipeng\_neu](https://www.ruby-forum.com/u/sunjipeng_neu)\
**Post date:** [February 22, 2011, 10:53am UTC](https://www.ruby-forum.com/t/whats-the-substitute-for-the-apaches-scriptalias/203530/2 "2011-02-22T10:53:04Z")

</div>

On Tue, Feb 22, 2011 at 04:26:03AM -0500, sunjipeng\_neu wrote:

Hi there,

> ScriptAlias /cgi-bin/ “/home1/irteam/gaga/cgi-bin/”
> 
> I haven’t found the related directive to the “ScriptAlias” in Nginx.

[mod\_alias - Apache HTTP Server Version 2.4](http://httpd.apache.org/docs/current/mod/mod_alias.html#scriptalias) says  
what ScriptAlias does. It is “Alias” with “Options +ExecCGI”.

nginx does have an alias directive.

nginx does not “do” cgi. You can proxy\_pass to a cgi-handling http  
server,  
or fastcgi\_pass or scgi\_pass or something similar, to a suitable server.

Once you have your cgi-handling server working, you configure the  
appropriate \*\_pass in the appropriate location block.

Good luck with it,

## f

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