A basic container for a private MediaGoblin media server.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nginx.conf 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. server {
  2. listen 80;
  3. server_name _;
  4. include /etc/nginx/mime.types;
  5. autoindex off;
  6. default_type application/octet-stream;
  7. sendfile on;
  8. gzip on;
  9. gzip_min_length 1024;
  10. gzip_buffers 4 32k;
  11. gzip_types text/plain application/x-javascript text/javascript text/xml text/css;
  12. access_log /dev/stdout;
  13. error_log stdout;
  14. # Change this to update the upload size limit for your users
  15. client_max_body_size 500m;
  16. # Give requests some more time, since we're running Celery tasks synchronously
  17. # for now.
  18. proxy_read_timeout 300s;
  19. proxy_send_timeout 300s;
  20. # prevent attacks (someone uploading a .txt file that the browser
  21. # interprets as an HTML file, etc.)
  22. add_header X-Content-Type-Options nosniff;
  23. # MediaGoblin's stock static files: CSS, JS, etc.
  24. location /mgoblin_static/ {
  25. alias /app/mediagoblin/static/;
  26. }
  27. # Instance specific media:
  28. location /mgoblin_media/ {
  29. alias /app/user_dev/media/public/;
  30. }
  31. # Theme static files (usually symlinked in)
  32. location /theme_static/ {
  33. alias /app/user_dev/theme_static/;
  34. }
  35. # Plugin static files (usually symlinked in)
  36. location /plugin_static/ {
  37. alias /app/user_dev/plugin_static/;
  38. }
  39. location / {
  40. include uwsgi_params;
  41. uwsgi_pass unix:///tmp/mediagoblin.uwsgi.sock;
  42. uwsgi_param SCRIPT_NAME "";
  43. }
  44. }