Using FasctCGI with Nginx and Seaside

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

Using FasctCGI with Nginx and Seaside

SeanTAllen
I did a writeup of how to get a bare bones basic FastCGI setup w/
Seaside. Hopefully someone in the future will find it useful:

http://www.monkeysnatchbanana.com/posts/2010/08/17/using-fastcgi-with-nginx-and-seaside.html

If there is anything that needs clarification or if you find any
typos, grammatical errors etc, please let me know.
Reply | Threaded
Open this post in threaded view
|

Re: Using FasctCGI with Nginx and Seaside

Nick
Hi Sean,

It's a great write-up - gives you just enough to get started without overwhelming.
One thought perhaps you could mention nginx ability to proxy http -> https connections, and link to your "Faking a https client for Glass" post (perhaps it should be titled: "Faking *an* https client for Glass"). Explaining the benefit over lighttpd.

Thanks again

Nick

Reply | Threaded
Open this post in threaded view
|

Re: Using FasctCGI with Nginx and Seaside

SeanTAllen
Why would it be an? The h in https isnt silent. So, it should be 'a' shouldn't?

Use an when the initial sound is a vowel ( without consonant ), otherwise use a.

So

a https
an honour
a cat
a university

etc...

right?

I'm thinking of doing a few more basic, how to do this in nginx and
then an overview that links them all together.
Thoughts on that?

On Wed, Aug 18, 2010 at 10:54 AM, Nick Ager <[hidden email]> wrote:

> Hi Sean,
> It's a great write-up - gives you just enough to get started
> without overwhelming.
> One thought perhaps you could mention nginx ability to proxy http -> https
> connections, and link to your "Faking a https client for Glass" post
> (perhaps it should be titled: "Faking *an* https client for Glass").
> Explaining the benefit over lighttpd.
> Thanks again
> Nick
>
Reply | Threaded
Open this post in threaded view
|

Re: Using FasctCGI with Nginx and Seaside

Nick
Hi Sean,

On 18 August 2010 16:08, Sean Allen <[hidden email]> wrote:
Why would it be an? The h in https isnt silent. So, it should be 'a' shouldn't?


Not sure the internet is divided - I googled for both...
 

I'm thinking of doing a few more basic, how to do this in nginx and
then an overview that links them all together.
Thoughts on that?


Perhaps you could add :

How to display a custom page for 403 50x errors (I get 403 when someone browses to /config /tools)
Setting up webdav (for custom monticello repositories)
how to debug (use the debug directive)

Here's my configuration:

user www-data;
worker_processes  1;

# note the extra debug parameter...#
#error_log  /var/log/nginx/error.log debug;
error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
    # multi_accept on;
}

http {
    include       /etc/nginx/mime.types;
    default_type application/octet-stream;
    access_log  /var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    upstream seaside {
       server 127.0.0.1:9001;
       server 127.0.0.1:9002;
       server 127.0.0.1:9003;
    }

    server {
       # server_name www.getitmade.com 
       server_name _;
       listen 80 default;
       root /var/nginx/www;

#       location /files {
#         expires 7d;
#       }

       location /config {
         allow 127.0.0.1;
         deny all;
         try_files $uri @seaside;
       }

       location /tools {
         allow 127.0.0.1;
         deny all;
         try_files $uri @seaside;
       }

       location / {
         try_files $uri @seaside;
#         error_page 404 403 = @seaside;
       }

       location @seaside {
          include /etc/nginx/fastcgi_params;
          fastcgi_intercept_errors on;
          fastcgi_pass seaside;
       }


       error_page 404 errors/404.html;
       error_page 403 errors/403.html;
       error_page 500 502 503 504 errors/50x.html;
    }

    # https proxy for secure calls out to specific process
    server {
      server_name paypal;

      location / {
         proxy_pass https://www.paypal.com;
        }
    }

    # webdev configuration for monticello
    server {
      server_name source.getitmade.com;
      listen 80;
      root /var/nginx/monticello;

      location / {
        autoindex on;
        expires max;
        client_max_body_size 20m;
        create_full_put_path on;
        client_body_temp_path /var/nginx/temp;
        dav_methods PUT DELETE MKCOL COPY MOVE;
        dav_access user:rw group:r all:r;

        auth_basic "Restricted";
        auth_basic_user_file /etc/nginx/passwd.dav;
      }
   }
}

 
Reply | Threaded
Open this post in threaded view
|

Re: Using FasctCGI with Nginx and Seaside

SeanTAllen
I assume your error directory is at the top of your directory root.
You should use /errors/ not errors/

I already planned to do one for setting up monticello w/ nginx.
Will add the others to the list.

On Wed, Aug 18, 2010 at 11:32 AM, Nick Ager <[hidden email]> wrote:

> Hi Sean,
>
> On 18 August 2010 16:08, Sean Allen <[hidden email]> wrote:
>>
>> Why would it be an? The h in https isnt silent. So, it should be 'a'
>> shouldn't?
>>
>
> Not sure the internet is divided - I googled for both...
>
>>
>> I'm thinking of doing a few more basic, how to do this in nginx and
>> then an overview that links them all together.
>> Thoughts on that?
>>
>
> Perhaps you could add :
> How to display a custom page for 403 50x errors (I get 403 when someone
> browses to /config /tools)
> Setting up webdav (for custom monticello repositories)
> how to debug (use the debug directive)
> Here's my configuration:
> user www-data;
> worker_processes  1;
> # note the extra debug parameter...#
> #error_log  /var/log/nginx/error.log debug;
> error_log  /var/log/nginx/error.log;
> pid        /var/run/nginx.pid;
> events {
>     worker_connections  1024;
>     # multi_accept on;
> }
> http {
>     include       /etc/nginx/mime.types;
>     default_type application/octet-stream;
>     access_log  /var/log/nginx/access.log;
>     sendfile        on;
>     #tcp_nopush     on;
>     #keepalive_timeout  0;
>     keepalive_timeout  65;
>     tcp_nodelay        on;
>     gzip  on;
>     gzip_disable "MSIE [1-6]\.(?!.*SV1)";
>     upstream seaside {
>        server 127.0.0.1:9001;
>        server 127.0.0.1:9002;
>        server 127.0.0.1:9003;
>     }
>     server {
>        # server_name www.getitmade.com
>        server_name _;
>        listen 80 default;
>        root /var/nginx/www;
> #       location /files {
> #         expires 7d;
> #       }
>        location /config {
>          allow 127.0.0.1;
>          deny all;
>          try_files $uri @seaside;
>        }
>        location /tools {
>          allow 127.0.0.1;
>          deny all;
>          try_files $uri @seaside;
>        }
>        location / {
>          try_files $uri @seaside;
> #         error_page 404 403 = @seaside;
>        }
>        location @seaside {
>           include /etc/nginx/fastcgi_params;
>           fastcgi_intercept_errors on;
>           fastcgi_pass seaside;
>        }
>
>        error_page 404 errors/404.html;
>        error_page 403 errors/403.html;
>        error_page 500 502 503 504 errors/50x.html;
>     }
>     # https proxy for secure calls out to specific process
>     server {
>       server_name paypal;
>       location / {
>          proxy_pass https://www.paypal.com;
>         }
>     }
>     # webdev configuration for monticello
>     server {
>       server_name source.getitmade.com;
>       listen 80;
>       root /var/nginx/monticello;
>       location / {
>         autoindex on;
>         expires max;
>         client_max_body_size 20m;
>         create_full_put_path on;
>         client_body_temp_path /var/nginx/temp;
>         dav_methods PUT DELETE MKCOL COPY MOVE;
>         dav_access user:rw group:r all:r;
>         auth_basic "Restricted";
>         auth_basic_user_file /etc/nginx/passwd.dav;
>       }
>    }
> }
>