ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

HowTo configure Nginx to run ChiliProject

Version 1 (Pedro Algarvio, 2011-07-03 12:23 pm)

1 1
h1. HowTo configure Nginx to run ChiliProject
2 1
3 1
In order to avoid duplication, follow the same "HowTo":http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Nginx_to_run_Redmine on Redmine's wiki.
4 1
After you finished that HowTo, let's fix deleting projects.
5 1
6 1
On the nginx configuration file find:
7 1
8 1
<pre>
9 1
    # When we're back to non-sensitive things, send back to http
10 1
    rewrite ^/$ http://your.domain.here$request_uri permanent;
11 1
12 1
    # Examples of URLs we don't want to rewrite (otherwise 404 errors occur):
13 1
    # /projects/PROJECTNAME/archive?status=
14 1
    # /projects/copy/PROJECTNAME
15 1
    # /projects/PROJECTNAME/destroy
16 1
17 1
    # This should exclude those (tested here: http://www.regextester.com/ )
18 1
    if ($uri !~* "^/projects/.*(copy|destroy|archive)") {
19 1
        rewrite ^/projects(.*) http://your.domain.here$request_uri permanent;
20 1
    }
21 1
</pre>
22 1
23 1
Replace with:
24 1
25 1
<pre>
26 1
    # When we're back to non-sensitive things, send back to http
27 1
    rewrite ^/$ http://dev.ufsoft.org$request_uri permanent;
28 1
29 1
    # We need to test if it's not a sensitive URL and if it's a GET method
30 1
    # since we should only redirect GET methods back to http!!!
31 1
    set $redirect_test "";
32 1
    if ( $request_method = GET ) {
33 1
        # This is a GET method, redirection can occurr
34 1
        set $redirect_test "G";
35 1
    }
36 1
37 1
    # Examples of URLs we don't want to rewrite (otherwise 404 errors occur):
38 1
    # /projects/PROJECTNAME/archive?status=
39 1
    # /projects/copy/PROJECTNAME
40 1
    # /projects/PROJECTNAME/destroy
41 1
42 1
    # This should exclude those (tested here: http://www.regextester.com/ )
43 1
    if ( $uri !~* "^/projects/.*(copy|destroy|archive)" ) {
44 1
        # This is not a sensisive url, redirection can occur
45 1
        set $redirect_test "${redirect_test}R";
46 1
    }
47 1
    if ($redirect_test = GR) {
48 1
        # Both tests above match, redirection can ocurr
49 1
        rewrite ^/projects(.*) http://dev.ufsoft.org$request_uri permanent;
50 1
    }
51 1
</pre>
52 1
53 1
Now, deleting projects should work again.