diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-04-10 02:07:48 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-04-10 02:07:48 -0400 |
commit | 5b149a4482ad11db8871368f3b616681536f5872 (patch) | |
tree | cefdcde4fd012c8fdc3e617219d2fe4f9405e770 /roles/mediagoblin/templates | |
parent | e79a42d63fe270875cab7773ecd7688870dfb829 (diff) | |
download | infra-5b149a4482ad11db8871368f3b616681536f5872.tar.gz infra-5b149a4482ad11db8871368f3b616681536f5872.zip |
mediagoblin: moving closer to HEAD
Diffstat (limited to 'roles/mediagoblin/templates')
-rw-r--r-- | roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 b/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 new file mode 100644 index 0000000..5a2c9ba --- /dev/null +++ b/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 @@ -0,0 +1,49 @@ + +server { + + listen 80; + listen [::]:80; + server_name {{ mediagoblin_hostname }}; + + # Change this to update the upload size limit for your users + client_max_body_size 8m; + + # prevent attacks (someone uploading a .txt file that the browser + # interprets as an HTML file, etc.) + add_header X-Content-Type-Options nosniff; + + server_name mediagoblin.example.org www.mediagoblin.example.org; + access_log /var/log/nginx/mediagoblin.example.access.log; + error_log /var/log/nginx/mediagoblin.example.error.log; + + # MediaGoblin's stock static files: CSS, JS, etc. + location /mgoblin_static/ { + alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/static/; + } + + # Instance specific media: + location /mgoblin_media/ { + alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/; + } + + # Theme static files (usually symlinked in) + location /theme_static/ { + alias /srv/mediagoblin.example.org/mediagoblin/user_dev/theme_static/; + } + + # Plugin static files (usually symlinked in) + location /plugin_static/ { + alias /srv/mediagoblin.example.org/mediagoblin/user_dev/plugin_static/; + } + + # Mounting MediaGoblin itself via FastCGI. + location / { + fastcgi_pass 127.0.0.1:26543; + include /etc/nginx/fastcgi_params; + + # our understanding vs nginx's handling of script_name vs + # path_info don't match :) + fastcgi_param PATH_INFO $fastcgi_script_name; + fastcgi_param SCRIPT_NAME ""; + } +} |