Hello, 
I tryed to make the script working on nginx.
Until  now I managed to get fastcgi work, and some of the rewrite rules.
2 problems that I couldn't solve are:
   - can't download, I get "Error happened when generating Download Link.
Please try again or Contact administrator. "
     I can think of two possible reasons: fastcgi lacks permissions (it can't create symlinks?)  or I messed up nginx rewrite rules most likely
  - can't upload same error, but that isn't important right now, I will pass uploads trought apache anyway after figure out the first problem
I know that there is a mod for nginx that works with xfilesharing, but it is expensive so I preffer to make it by myself ,  any help is appreciated.
Nginx conf:
        rewrite "^/([0-9A-Za-z]{12})-del-([0-9A-Za-z]+)/.+$"                    /cgi-bin/index.cgi?del=$1-$2 last;
        rewrite "^/([0-9A-Za-z\-_]*)/?([0-9A-Za-z]{12})(/[^\/]*|)(\.html?|$)$"  /cgi-bin/index.cgi?op=download1&usr_login=$1$
        rewrite ^/([0-9A-Za-z\-_]+)(/[0-9a-z\-_]*/?|$)$                         /cgi-bin/index.cgi?op=user_public&usr_login=$
        rewrite ^/([a-z0-9\-\_]+)\.html(.*)$                                    /cgi-bin/index.cgi?op=page&tmpl=$1$2 last;
        location / {
            root   /etc/nginx/html;
            index  index.html index.htm;
            rewrite ^ /cgi-bin/index.cgi last;
        }
        location ~ ^/images/(.*)$ {
            alias  /etc/nginx/html/images/$1;
        }
        location ~ ^/captchas/(.*)$ {
            alias  /etc/nginx/html/captchas/$1;
        }
        location /main.css {
            alias  /etc/nginx/html/main.css;
        }
 location ~ ^/cgi-bin/.*\.cgi$ {
            root        /etc/nginx/cgi-bin;
            gzip        off;
            include fastcgi_params;
            fastcgi_pass   127.0.0.1:8999;
            fastcgi_index  index.cgi;
            fastcgi_param  SCRIPT_FILENAME  /etc/nginx$fastcgi_script_name;
        }
			
									
									
						XFileSharing Pro - Nginx and XFileSharing
- 
				sherayusuf3
- Posts: 94
- Joined: Jan 18, 2009 4:29 am

 Facebook
 Facebook Twitter
 Twitter