1
0

nginx.conf 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. server {
  2. listen 8109;
  3. listen [::]:8109;
  4. set $app_root '/home/hi/p/cityapper-com-school/demos/notes-app/day-1';
  5. root $app_root;
  6. auth_basic_user_file $app_root/.htpasswd;
  7. auth_basic "Restricted";
  8. # Add index.php to the list if you are using PHP
  9. index index.html;
  10. #server_name hi-pi-64.local;
  11. location / {
  12. # First attempt to serve request as file, then
  13. # as directory, then fall back to displaying a 404.
  14. try_files $uri $uri/ =404;
  15. }
  16. location /storage {
  17. autoindex on;
  18. alias $app_root/storage;
  19. # dav allowed method
  20. dav_methods PUT DELETE MKCOL COPY MOVE;
  21. # Allow current scope perform specified DAV method
  22. dav_ext_methods PROPFIND OPTIONS;
  23. # In this folder, newly created folder or file is to have specified permission. If none is given, default is user:rw. If all or group permission is specified, user could be skipped
  24. dav_access user:rw group:rw all:r;
  25. # Temporary folder
  26. client_body_temp_path /tmp;
  27. # MAX size of uploaded file, 0 mean unlimited
  28. client_max_body_size 0;
  29. # Allow autocreate folder here if necessary
  30. create_full_put_path on;
  31. }
  32. }