Commit | Line | Data |
---|---|---|
cc84a658 LMM |
1 | ################################################# |
2 | # Stock useful config options, but ignore them :) | |
3 | ################################################# | |
4 | include /etc/nginx/mime.types; | |
5 | ||
6 | autoindex off; | |
7 | default_type application/octet-stream; | |
8 | sendfile on; | |
9 | ||
10 | # Gzip | |
11 | gzip on; | |
12 | gzip_min_length 1024; | |
13 | gzip_buffers 4 32k; | |
14 | gzip_types text/plain application/x-javascript text/javascript text/xml text/css; | |
15 | ||
16 | ##################################### | |
17 | # Mounting MediaGoblin stuff | |
18 | # This is the section you should read | |
19 | ##################################### | |
20 | ||
21 | # Change this to update the upload size limit for your users | |
22 | client_max_body_size 4g; | |
23 | ||
24 | # prevent attacks (someone uploading a .txt file that the browser | |
25 | # interprets as an HTML file, etc.) | |
26 | add_header X-Content-Type-Options nosniff; | |
27 | ||
28 | # MediaGoblin's stock static files: CSS, JS, etc. | |
29 | location /mgoblin_static/ { | |
d5ce9fc0 | 30 | alias GMG_PATH_TOKEN/mediagoblin/mediagoblin/static/; |
cc84a658 LMM |
31 | } |
32 | ||
33 | # Instance specific media: | |
34 | location /mgoblin_media/ { | |
d5ce9fc0 | 35 | alias GMG_PATH_TOKEN/mediagoblin/user_dev/media/public/; |
cc84a658 LMM |
36 | } |
37 | ||
38 | # Theme static files (usually symlinked in) | |
39 | location /theme_static/ { | |
d5ce9fc0 | 40 | alias GMG_PATH_TOKEN/mediagoblin/user_dev/theme_static/; |
cc84a658 LMM |
41 | } |
42 | ||
43 | # Plugin static files (usually symlinked in) | |
44 | location /plugin_static/ { | |
d5ce9fc0 | 45 | alias GMG_PATH_TOKEN/mediagoblin/user_dev/plugin_static/; |
cc84a658 LMM |
46 | } |
47 | ||
48 | # Mounting MediaGoblin itself via FastCGI. | |
49 | location / { | |
50 | fastcgi_pass 127.0.0.1:26543; | |
51 | include /etc/nginx/fastcgi_params; | |
52 | ||
53 | # our understanding vs nginx's handling of script_name vs | |
54 | # path_info don't match :) | |
55 | fastcgi_param PATH_INFO $fastcgi_script_name; | |
56 | fastcgi_param SCRIPT_NAME ""; | |
57 | } |