glype 404 error nginx/0.7.59+ fastcgi

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

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

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):


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 (

server {
            listen   80;
            rewrite ^/(.*)$1 permanent;

server {
            listen   80;
            access_log /home/public_html/;
            error_log /home/public_html/;

                        root   /home/public_html/;
                        index  index.html index.php;
                        autoindex on;

            # pass the PHP scripts to FastCGI server listening on

             location ~ ^.+\.php$    {
            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:,50781,51662#msg-51662

More information about the nginx mailing list