首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > Ruby Rails >

nginx+passenger调度ror

2012-09-14 
nginx+passenger部署ror配置参数:http://blog.lizhigang.net/archives/137./configure --prefix/usr/loca

nginx+passenger部署ror
配置参数:http://blog.lizhigang.net/archives/137
./configure --prefix=/usr/local/nginx --with-http_ssl_module  --with-pcre=/usr/local/soft/pcre-8.30 --with-openssl=/usr/local /soft/openssl-1.0.1 --add-module=/usr/soft/passenger-3.0.11
1.安装passenger:

server {        listen       80;        server_name  localhost;        root /ror/public;   # <--- be sure to point to 'public'!             passenger_enabled on;        rails_env development;        #charset koi8-r;        #access_log  logs/host.access.log  main;            #error_page  404              /404.html;        # redirect server error pages to the static page /50x.html        #        error_page   500 502 503 504  /50x.html;        location = /50x.html {            root   html;        }        # proxy the PHP scripts to Apache listening on 127.0.0.1:80        #        #location ~ \.php$ {        #    proxy_pass   http://127.0.0.1;        #}        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000        #        #location ~ \.php$ {        #    root           html;        #    fastcgi_pass   127.0.0.1:9000;        #    fastcgi_index  index.php;        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;        #    include        fastcgi_params;        #}        # deny access to .htaccess files, if Apache's document root        # concurs with nginx's one        #        #location ~ /\.ht {        #    deny  all;        #}}server {        listen       3080;        server_name  localhost;        root /var/www/abc/public;   # <--- be sure to point to 'public'!             passenger_enabled on;        charset utf-8;        sendfile on;        error_page   500 502 503 504  /50x.html;        location = /50x.html {            root   html;        }    }   upstream backserver{      server 127.0.0.1:3080;    }    server {        listen       80;        server_name  localhost;        root /var/www/abc/public;   # <--- be sure to point to 'public'!             passenger_enabled on;        charset utf-8;        sendfile on;        #access_log  logs/host.access.log  main;            #error_page  404              /404.html;        # redirect server error pages to the static page /50x.html        #        error_page   500 502 503 504  /50x.html;        location = /50x.html {            root   html;        }        # proxy the PHP scripts to Apache listening on 127.0.0.1:80        #        #location ~ \.php$ {        #    proxy_pass   http://127.0.0.1;        #}        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000        #        #location ~ \.php$ {        #    root           html;        #    fastcgi_pass   127.0.0.1:9000;        #    fastcgi_index  index.php;        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;        #    include        fastcgi_params;        #}        # deny access to .htaccess files, if Apache's document root        # concurs with nginx's one        #        #location ~ /\.ht {        #    deny  all;        #}    }    

热点排行