default.conf 730 B

123456789101112131415161718192021222324252627
  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. }
  19. }
  20. # You may need this to prevent return 404 recursion.
  21. location = /404.html {
  22. internal;
  23. }
  24. }