Deploying problem with serverPath and nginx

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploying problem with serverPath and nginx

Mariano Martinez Peck
Hi guys, 

I am having a problem trying to deploy an app with nginx. Say my seaside app is registered with a name 'myApp' and I am deploying it at: https://localhost/myApp and I want to have it under 'https://localhost/test'. I am using nginx and FastCGI (Gemstone).

Notice that I don't want to register the app with a different name ('test' in this example). I want the app to continue being deployed with 'myApp' name. I just change to change the URL suffix. 

In seaside side I did:

app
    preferenceAt: #serverProtocol put: 'https';
    preferenceAt: #serverHostname put: 'localhost';
    preferenceAt: #serverPort put: 443;
     preferenceAt: #serverPath put: '/test'. 

And in nginx I have:


location /test {
       try_files $uri @seasideTest;
}


        location @seasideTest {
          include fastcgi_params;
          fastcgi_pass seaside;

        } 


      upstream seaside 
      {
        server localhost:9001;
      }


However, if I browse  'https://localhost/test' I get a "/test not found". And in nginx logs I get "2014/01/06 10:51:06 [info] 43449#0: *31 client prematurely closed connection while reading client request line, client: 127.0.0.1, server: localhost"

Any idea what I am doing wrong? Maybe I still need a rewrite of the url from '/test' to '/myApp' ? ...

Thanks in advance, 


--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] Deploying problem with serverPath and nginx

Dale Henrichs-3
Mariano,

If you haven't already, you might ask this question on the seaside list as well ... (I know that I don't know the answer:)

Dale


From: "Mariano Martinez Peck" <[hidden email]>
To: "Seaside - general discussion" <[hidden email]>
Cc: [hidden email]
Sent: Monday, January 6, 2014 5:59:13 AM
Subject: [Glass] Deploying problem with serverPath and nginx

Hi guys, 

I am having a problem trying to deploy an app with nginx. Say my seaside app is registered with a name 'myApp' and I am deploying it at: https://localhost/myApp and I want to have it under 'https://localhost/test'. I am using nginx and FastCGI (Gemstone).

Notice that I don't want to register the app with a different name ('test' in this example). I want the app to continue being deployed with 'myApp' name. I just change to change the URL suffix. 

In seaside side I did:

app
    preferenceAt: #serverProtocol put: 'https';
    preferenceAt: #serverHostname put: 'localhost';
    preferenceAt: #serverPort put: 443;
     preferenceAt: #serverPath put: '/test'. 

And in nginx I have:


location /test {
       try_files $uri @seasideTest;
}


        location @seasideTest {
          include fastcgi_params;
          fastcgi_pass seaside;

        } 


      upstream seaside 
      {
        server localhost:9001;
      }


However, if I browse  'https://localhost/test' I get a "/test not found". And in nginx logs I get "2014/01/06 10:51:06 [info] 43449#0: *31 client prematurely closed connection while reading client request line, client: 127.0.0.1, server: localhost"

Any idea what I am doing wrong? Maybe I still need a rewrite of the url from '/test' to '/myApp' ? ...

Thanks in advance, 


--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] Deploying problem with serverPath and nginx

tty
Assuming you are using apache and vhosts, my first thought is vhosts problem in  /etc/httpd/extra/http-vhosts.conf.



---- On Mon, 06 Jan 2014 08:13:34 -0800 Dale K. Henrichs <[hidden email]> wrote ----

Mariano,

If you haven't already, you might ask this question on the seaside list as well ... (I know that I don't know the answer:)

Dale


From: "Mariano Martinez Peck" <[hidden email]>
To: "Seaside - general discussion" <[hidden email]>
Cc: [hidden email]
Sent: Monday, January 6, 2014 5:59:13 AM
Subject: [Glass] Deploying problem with serverPath and nginx

Hi guys, 

I am having a problem trying to deploy an app with nginx. Say my seaside app is registered with a name 'myApp' and I am deploying it at: https://localhost/myApp and I want to have it under 'https://localhost/test'. I am using nginx and FastCGI (Gemstone).

Notice that I don't want to register the app with a different name ('test' in this example). I want the app to continue being deployed with 'myApp' name. I just change to change the URL suffix. 

In seaside side I did:

app
    preferenceAt: #serverProtocol put: 'https';
    preferenceAt: #serverHostname put: 'localhost';
    preferenceAt: #serverPort put: 443;
     preferenceAt: #serverPath put: '/test'. 

And in nginx I have:


location /test {
       try_files $uri @seasideTest;
}


        location @seasideTest {
          include fastcgi_params;
          fastcgi_pass seaside;

        } 


      upstream seaside 
      {
        server localhost:9001;
      }


However, if I browse  'https://localhost/test' I get a "/test not found". And in nginx logs I get "2014/01/06 10:51:06 [info] 43449#0: *31 client prematurely closed connection while reading client request line, client: 127.0.0.1, server: localhost"

Any idea what I am doing wrong? Maybe I still need a rewrite of the url from '/test' to '/myApp' ? ...

Thanks in advance, 


--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] Deploying problem with serverPath and nginx

Dale Henrichs-3
In reply to this post by Dale Henrichs-3
haha ... you already did:)

Dale


From: "Dale K. Henrichs" <[hidden email]>
To: "Mariano Martinez Peck" <[hidden email]>
Cc: [hidden email], "Seaside - general discussion" <[hidden email]>
Sent: Monday, January 6, 2014 8:13:34 AM
Subject: Re: [Glass] Deploying problem with serverPath and nginx

Mariano,

If you haven't already, you might ask this question on the seaside list as well ... (I know that I don't know the answer:)

Dale


From: "Mariano Martinez Peck" <[hidden email]>
To: "Seaside - general discussion" <[hidden email]>
Cc: [hidden email]
Sent: Monday, January 6, 2014 5:59:13 AM
Subject: [Glass] Deploying problem with serverPath and nginx

Hi guys, 

I am having a problem trying to deploy an app with nginx. Say my seaside app is registered with a name 'myApp' and I am deploying it at: https://localhost/myApp and I want to have it under 'https://localhost/test'. I am using nginx and FastCGI (Gemstone).

Notice that I don't want to register the app with a different name ('test' in this example). I want the app to continue being deployed with 'myApp' name. I just change to change the URL suffix. 

In seaside side I did:

app
    preferenceAt: #serverProtocol put: 'https';
    preferenceAt: #serverHostname put: 'localhost';
    preferenceAt: #serverPort put: 443;
     preferenceAt: #serverPath put: '/test'. 

And in nginx I have:


location /test {
       try_files $uri @seasideTest;
}


        location @seasideTest {
          include fastcgi_params;
          fastcgi_pass seaside;

        } 


      upstream seaside 
      {
        server localhost:9001;
      }


However, if I browse  'https://localhost/test' I get a "/test not found". And in nginx logs I get "2014/01/06 10:51:06 [info] 43449#0: *31 client prematurely closed connection while reading client request line, client: 127.0.0.1, server: localhost"

Any idea what I am doing wrong? Maybe I still need a rewrite of the url from '/test' to '/myApp' ? ...

Thanks in advance, 


--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] Deploying problem with serverPath and nginx

otto
In reply to this post by Mariano Martinez Peck
> Any idea what I am doing wrong? Maybe I still need a rewrite of the url from
> '/test' to '/myApp' ? ...

I think you have to rewrite because you're "hiding" the registered app
url behind another that you expose via nginx.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Deploying problem with serverPath and nginx

Esteban A. Maringolo
In reply to this post by Mariano Martinez Peck
Mariano:

A question for your question: why do you configure Seaside to serve
HTTPS (or at least at port 443)?

Why not offload all the TLS/SSL work to nginx frontend and serve plain
old HTTP.


Regards,


Esteban A. Maringolo


2014/1/6 Mariano Martinez Peck <[hidden email]>:

> Hi guys,
>
> I am having a problem trying to deploy an app with nginx. Say my seaside app
> is registered with a name 'myApp' and I am deploying it at:
> https://localhost/myApp and I want to have it under
> 'https://localhost/test'. I am using nginx and FastCGI (Gemstone).
>
> Notice that I don't want to register the app with a different name ('test'
> in this example). I want the app to continue being deployed with 'myApp'
> name. I just change to change the URL suffix.
>
> In seaside side I did:
>
> app
>     preferenceAt: #serverProtocol put: 'https';
>     preferenceAt: #serverHostname put: 'localhost';
>     preferenceAt: #serverPort put: 443;
>      preferenceAt: #serverPath put: '/test'.
>
> And in nginx I have:
>
>
> location /test {
>        try_files $uri @seasideTest;
> }
>
>
>         location @seasideTest {
>           include fastcgi_params;
>           fastcgi_pass seaside;
>
>         }
>
>
>       upstream seaside
>       {
>         server localhost:9001;
>       }
>
>
> However, if I browse  'https://localhost/test' I get a "/test not found".
> And in nginx logs I get "2014/01/06 10:51:06 [info] 43449#0: *31 client
> prematurely closed connection while reading client request line, client:
> 127.0.0.1, server: localhost"
>
> Any idea what I am doing wrong? Maybe I still need a rewrite of the url from
> '/test' to '/myApp' ? ...
>
> Thanks in advance,
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside