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