Welcome! Log In Create A New Profile

Advanced

Re: Help : How to configure mongrel_cluster + PHP with nginx

May 11, 2010 09:10AM
On Tue, May 11, 2010 at 7:37 PM, karthi r <karthikr2006@gmail.com> wrote:
> Hi Nginx team,
>
>              We are running Ruby on Rails application (Mongrel_cluster) with
> nginx, we tried to install PHP application in same server but the proxy_pass
> not redirected.
>
> How to configure mongrel_cluster + PHP with nginx same server and same
> domain
>
>
> Thanks and Regards,
> R.Karthik
>

upstream railsapp1 {
server 127.0.0.1:9000;
server 127.0.0.1:9001;
}
upstream railsapp2 {
server 127.0.0.1:9010;
server 127.0.0.1:9011;
}
server {
listen 80;
server_name lotsofapps.com;
location = / { rewrite ^ /phpapp1/ permanent; }
location ~ ^/phpapp1/.*\.php$ {
root /srv/http/php;
fastcgi_pass 127.0.0.1:9100;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
location /phpapp1/ {
root /srv/http/php;
index index.php;
try_files $uri $uri/ /phpapp1/index.php;
}
location = /phpapp1 { rewrite ^ /phpapp1/ permanent; }
location @railsapp1 { proxy_pass http://railsapp1; }
location = /railsapp1 { rewrite ^ /railsapp1/ permanent; }
location /railsapp1/ {
alias /srv/http/rails/railsapp1/public/;
try_files $uri @railsapp1;
expires max;
}
location @railsapp2 { proxy_pass http://railsapp2; }
location = /railsapp2 { rewrite ^ /railsapp2/ permanent; }
location /railsapp2/ {
alias /srv/http/rails/devel/railsapp2/public/;
try_files $uri @railsapp2;
expires max;
}
location /whatever/ {
root /srv/temp;
autoindex on;
}
location /apacheapp/ { proxy_pass http://127.0.0.1:9200; }
}

etc.

--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

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

Help : How to configure mongrel_cluster + PHP with nginx

karthi r May 11, 2010 08:50AM

Re: Help : How to configure mongrel_cluster + PHP with nginx

Igor Sysoev May 11, 2010 09:02AM

Re: Help : How to configure mongrel_cluster + PHP with nginx

edogawaconan May 11, 2010 09:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 173
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready