default.conf 718 B

12345678910111213141516171819202122232425262728
  1. # This is a default site configuration which will simply return 404, preventing
  2. # chance access to any other virtualhost.
  3. server {
  4. listen 80 default_server;
  5. root /app/public;
  6. client_max_body_size 50M;
  7. index index.php index.html index.htm default.php default.htm default.html;
  8. # Everything is a 404
  9. location ~ [^/]\.php(/|$) {
  10. try_files $uri =404;
  11. fastcgi_pass unix:/tmp/php-cgi-74.sock;
  12. fastcgi_index index.php;
  13. include fastcgi.conf;
  14. }
  15. location / {
  16. if (!-e $request_filename){
  17. rewrite ^(.*)$ /index.php?s=$1 last;
  18. break;
  19. }
  20. }
  21. # You may need this to prevent return 404 recursion.
  22. location = /404.html {
  23. internal;
  24. }
  25. }