nginx-default.conf 703 B

12345678910111213141516171819202122232425262728293031
  1. # adapted from https://gist.github.com/md5/d9206eacb5a0ff5d6be0#file-wordpress-fpm-conf
  2. server {
  3. listen 80;
  4. root /var/www/html;
  5. client_max_body_size 0;
  6. index index.php;
  7. location / {
  8. try_files $uri $uri/ /index.php?$args;
  9. }
  10. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  11. location ~ [^/]\.php(/|$) {
  12. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  13. if (!-f $document_root$fastcgi_script_name) {
  14. return 404;
  15. }
  16. include fastcgi_params;
  17. fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
  18. #fastcgi_param PATH_INFO $fastcgi_path_info;
  19. #fastcgi_param PATH_TRANSLATED /var/www/html/$fastcgi_path_info;
  20. fastcgi_pass fpm:9000;
  21. fastcgi_index index.php;
  22. }
  23. }