nginx-site.conf.j2 842 B

1234567891011121314151617181920212223242526
  1. server {
  2. server_name *.{{ansible_hostname}}.local;
  3. root /usr/local/src/pixelfed/public/;
  4. index index.html index.htm index.php;
  5. charset utf-8;
  6. client_max_body_size 15M;
  7. location / {
  8. try_files $uri $uri/ /index.php?$query_string;
  9. }
  10. location = /favicon.ico { access_log off; log_not_found off; }
  11. location = /robots.txt { access_log off; log_not_found off; }
  12. error_page 404 /index.php;
  13. location ~ \.php$ {
  14. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  15. try_files $fastcgi_script_name =404;
  16. fastcgi_pass 127.0.0.1:9000;
  17. fastcgi_index index.php;
  18. include fastcgi_params;
  19. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # or $request_filename
  20. }
  21. }