docker-nginx.conf 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. server {
  2. #################################################
  3. # Stock useful config options, but ignore them :)
  4. #################################################
  5. include /etc/nginx/mime.types;
  6. autoindex off;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. # Gzip
  10. gzip on;
  11. gzip_min_length 1024;
  12. gzip_buffers 4 32k;
  13. gzip_types text/plain application/x-javascript text/javascript text/xml text/css;
  14. #####################################
  15. # Mounting MediaGoblin stuff
  16. # This is the section you should read
  17. #####################################
  18. # Change this to update the upload size limit for your users
  19. client_max_body_size 800m;
  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. server_name mediagoblin.example.org www.mediagoblin.example.org;
  24. access_log /var/log/nginx/mediagoblin.example.access.log;
  25. error_log /var/log/nginx/mediagoblin.example.error.log;
  26. # MediaGoblin's stock static files: CSS, JS, etc.
  27. location /mgoblin_static/ {
  28. alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/static/;
  29. }
  30. # Instance specific media:
  31. location /mgoblin_media/ {
  32. alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/;
  33. }
  34. # Theme static files (usually symlinked in)
  35. location /theme_static/ {
  36. alias /srv/mediagoblin.example.org/mediagoblin/user_dev/theme_static/;
  37. }
  38. # Plugin static files (usually symlinked in)
  39. location /plugin_static/ {
  40. alias /srv/mediagoblin.example.org/mediagoblin/user_dev/plugin_static/;
  41. }
  42. # Mounting MediaGoblin itself via FastCGI.
  43. location / {
  44. fastcgi_pass 127.0.0.1:26543;
  45. include /etc/nginx/fastcgi_params;
  46. # our understanding vs nginx's handling of script_name vs
  47. # path_info don't match :)
  48. fastcgi_param PATH_INFO $fastcgi_script_name;
  49. fastcgi_param SCRIPT_NAME "";
  50. }
  51. }