glype 404 error nginx/0.7.59+ fastcgi

zereshk nginx-forum at nginx.us
Sun Feb 7 13:49:44 MSK 2010


Thanks so muchRob. Following your helpful config files and this nice, noob-friendly tutorial:

http://guvnr.com/web/web-dev/install-nginx-not-apache/

at last I could manage to get nginx running glype.

I put my working config files here just in case they can help others to bang their head on the issue (use Rob's for fastcgi_params):

nginx.conf

user www-data www-data;
worker_processes  4;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    tcp_nopush      on;
    tcp_nodelay     off;
    keepalive_timeout  5;

    gzip  on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types      text/plain text/css application/x-javascript text/xml application/xml $

     include /usr/local/nginx/sites-enabled/*;
     include         /usr/local/nginx/conf/fastcgi_params;

}


vhost1 (example.com)

server {
            listen   80;
            server_name  www.example.com;
            rewrite ^/(.*) http://example.com/$1 permanent;
       }

server {
            listen   80;
            server_name example.com;
            access_log /home/public_html/example.com/log/access.log;
            error_log /home/public_html/example.com/log/error.log;


                        root   /home/public_html/example.com/public/;
                        index  index.html index.php;
                        autoindex on;

            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

             location ~ ^.+\.php$    {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
                        }

                location ~* ^.+\.(jpg|jpeg|gif|png)$ {
                        access_log   off;
                        expires      30d;
                }

       }


As you see these are very basic files, but it took me one week to get them up and running. 

Another thing worth noting is that when I used a tweaked version of Glype which happened to lacked main.js, I encountered 404 error (I guess it was the main reason at the first place!) However, apache2 did not complaint about  the lacking file it and runs the very same tweaked script.

Now down to optimisation. Hope it does not suffer from bloating behaviours of apache :)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,50781,51662#msg-51662




More information about the nginx mailing list