fixed typo
[fai-configs.git] / files / etc / nginx / mediagoblin-common.conf / DEFAULT
CommitLineData
cc84a658
LMM
1server {
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/ {
d5ce9fc0 31 alias GMG_PATH_TOKEN/mediagoblin/mediagoblin/static/;
cc84a658
LMM
32 }
33
34 # Instance specific media:
35 location /mgoblin_media/ {
d5ce9fc0 36 alias GMG_PATH_TOKEN/mediagoblin/user_dev/media/public/;
cc84a658
LMM
37 }
38
39 # Theme static files (usually symlinked in)
40 location /theme_static/ {
d5ce9fc0 41 alias GMG_PATH_TOKEN/mediagoblin/user_dev/theme_static/;
cc84a658
LMM
42 }
43
44 # Plugin static files (usually symlinked in)
45 location /plugin_static/ {
d5ce9fc0 46 alias GMG_PATH_TOKEN/mediagoblin/user_dev/plugin_static/;
cc84a658
LMM
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 }
d5ce9fc0 59}