Welcome! Log In Create A New Profile

Advanced

Re: How to write ScriptAlias in nginx.conf like in httpd.conf

Francis Daly
August 08, 2012 07:10PM
On Thu, Aug 09, 2012 at 12:55:58AM +0200, Swapnil P. wrote:

Hi there,

> I have to configure nginx.conf just like the httpd.conf and stuck while
> configuring ScriptAlias. I have
>
> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
>
> i want to write the above in nginx.conf. How can I write it?

location /cgi-bin/ {
proxy_pass http://apache_server:apache_port
}

(ScriptAlias in apache httpd is for configuring CGI handling. nginx
doesn't handle CGI, so you need to decide how you want the urls to be
handled. This version just proxies them to your running apache.)

Depending on the rest of your nginx.conf, you may want " ^~" after
"location".

http://nginx.org/r/location
http://nginx.org/r/proxy_pass

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to write ScriptAlias in nginx.conf like in httpd.conf

Swapnil P. August 08, 2012 06:58PM

Re: How to write ScriptAlias in nginx.conf like in httpd.conf

Francis Daly August 08, 2012 07:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready