ukris / typhoonae

Automatically exported from code.google.com/p/typhoonae
0 stars 0 forks source link

static_dir in app.yaml uses the wrong dir #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create app with app.yaml including this:
-   url: /foo
     static_dir: bar

2. Access file in "foo" dir like this: http://example.com/foo/<file>
3. Server responds with error 404.

What is the expected output? What do you see instead?

Nginx tries to look for these files in a local dir "foo" instead of a "bar".

If both dir names are equal - everything works fine.

Original issue reported on code.google.com by dimaulu...@gmail.com on 10 Jan 2010 at 1:59

GoogleCodeExporter commented 9 years ago

Original comment by tobias.r...@gmail.com on 14 Jan 2010 at 7:15

GoogleCodeExporter commented 9 years ago
In this case apptool misinterprets the static_dir option. It must write an 
appropriate rewrite rule. For the given 
sample it should result in following NGINX configuration (in etc/server.conf):

location ~* ^/(foo)/ {
    root /path/to/your/app;
    rewrite ^/(foo)/(.*)$ /bar/$2 break;
    expires 30d;
}

As a workaround this can be solved by manually editing the etc/server.conf 
file. However, I'm going to fix this 
in apptool for the next release.

Original comment by tobias.r...@gmail.com on 14 Jan 2010 at 9:27

GoogleCodeExporter commented 9 years ago
Fixed in the trunk.

Original comment by tobias.r...@gmail.com on 17 Jan 2010 at 4:13

GoogleCodeExporter commented 9 years ago
Fix included in 0.1.2 release.

Original comment by tobias.r...@gmail.com on 8 Feb 2010 at 8:12