Ubuntu Gutsy - Nginx, Rails and Mongrels

Tengo esta configuracion en mi slice de 512, quiero saber si alguno a
podido
correr dos aplicaciones, una en el dominio principal y otra en un
subdominio
o en una subcarpeta dentro del dominio, e intentando con los proxys,
prendiendo 2 puertos para la aplicaciones principal y me funciona
perfectamente, pero al hacer la configuracion para el subdominio me da
un
error 502, e buscado en google pero no e encontrado info, asi que
recurro a
ustedes para ver si alguno me puede colaborar.

Gracias

Mauricio Dulcce

+57 300 325 0335
Trasn 9c No. 130c-21
Bogotá, Colombia
http://mauricio-dulce.neurona.com

Privileged/Confidential Information may be contained in this message. If
you

are not the addressee indicated in this message or responsible for
delivery
of the message to such person), you may not copy or deliver this message
to
anyone. In such case, you should destroy this message and kindly notify
the
sender by reply email. Please advise immediately if you or your employer
do
not consent to Internet email for messages of this kind. Opinions,
conclusions and other information in this message that do not relate to
the
official business of my firm shall be understood as neither given nor
endorsed by it.

Donde esta la configuración …

Un saludo,

Francesc

On Feb 14, 2008, at 2:52 PM, Mauricio D. wrote:

Gracias
Privileged/Confidential Information may be contained in this
conclusions and other information in this message that do not relate
to the
official business of my firm shall be understood as neither given nor
endorsed by it.


Ror-es mailing list
[email protected]
simplelogica.net


Not sent from my iPhone

No puedo ayudar directamente pero sin duda todas mis dudas sobre nginx
han encontrado respuesta en [1] y en tu caso en concreto a lo mejor [2]
te ayuda.

Suerte.

[1] http://wiki.codemongers.com/Main
[2] http://wiki.codemongers.com/NginxRubyonRailsMongrel

Mauricio D. escribió:

Hola Francesc pues e seguido los pasos del tutorial de slicehost que es
este
http://articles.slicehost.com/2008/1/16/ubuntu-gutsy-nginx-vhosts-rails-and-mongrels,
lo que hice fue cambiar estos datos

upstream subdomain1 {
server 127.0.0.1:8002;
server 127.0.0.1:8003;
}

server {
listen 80;
server_name www.sub.domain.com;
rewrite ^/(.*) http://sub.domain.com permanent;
}

server {
listen 80;
server_name sub.domain.com;

        access_log /home/demo/public_html/railsapp/log/access.log;
        error_log /home/demo/public_html/railsapp/log/error.log;

        root   /home/demo/public_html/railsapp/public/;
        index  index.html;

        location / {
                      proxy_set_header  X-Real-IP  $remote_addr;
                      proxy_set_header  X-Forwarded-For

$proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect false;

                      if (-f $request_filename/index.html) {
                                       rewrite (.*) $1/index.html 

break;
}

                      if (-f $request_filename.html) {
                                       rewrite (.*) $1.html break;
                      }

                      if (!-f $request_filename) {
                                       proxy_pass http://subdomain1;
                                       break;
                      }
        }

}

no se si esta sea la manera correcta pero me gusto mas *Nginx que el
apache
*2008/2/14, Francesc E. [email protected]:

Gracias
Privileged/Confidential Information may be contained in this
conclusions and other information in this message that do not relate


Not sent from my iPhone


Ror-es mailing list
[email protected]
simplelogica.net

Mauricio Dulcce

+57 300 325 0335
Trasn 9c No. 130c-21
Bogotá, Colombia

Privileged/Confidential Information may be contained in this message. If
you

are not the addressee indicated in this message or responsible for
delivery
of the message to such person), you may not copy or deliver this message
to
anyone. In such case, you should destroy this message and kindly notify
the
sender by reply email. Please advise immediately if you or your employer
do
not consent to Internet email for messages of this kind. Opinions,
conclusions and other information in this message that do not relate to
the
official business of my firm shall be understood as neither given nor
endorsed by it.

vale gracias

2008/2/14, cartuchoGL [email protected]:

Mauricio D. escribió:

    server 127.0.0.1:8002 <http://127.0.0.1:8002>;



                      if (!-f $request_filename) {
  • Francesc
    aplicaciones

    delivery
    official business of my firm shall be understood as neither
    simplelogica.net
    simplelogica.net
    Bogotá, Colombia
    sender by reply email. Please advise immediately if you or your

Mauricio Dulcce

+57 300 325 0335
Trasn 9c No. 130c-21
Bogotá, Colombia

Privileged/Confidential Information may be contained in this message. If
you

are not the addressee indicated in this message or responsible for
delivery
of the message to such person), you may not copy or deliver this message
to
anyone. In such case, you should destroy this message and kindly notify
the
sender by reply email. Please advise immediately if you or your employer
do
not consent to Internet email for messages of this kind. Opinions,
conclusions and other information in this message that do not relate to
the
official business of my firm shall be understood as neither given nor
endorsed by it.