The script Oppaitime uses to serve and manage images

nginx.conf.example 674B

12345678910111213141516171819202122232425
  1. server {
  2. listen 80;
  3. server_name img.your.domain;
  4. root /var/www/img.your.domain;
  5. location / {
  6. try_files /index.php =500;
  7. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  8. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  9. fastcgi_index index.php;
  10. include fastcgi_params;
  11. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  12. }
  13. location /thumb/ {
  14. try_files /index.php =500;
  15. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  16. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  17. fastcgi_index index.php;
  18. include fastcgi_params;
  19. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  20. image_filter_buffer 50M;
  21. image_filter resize 400 400;
  22. }
  23. }