nginx.template.conf 708 B

12345678910111213141516171819202122232425262728293031323334
  1. worker_processes auto;
  2. error_log stderr;
  3. pid /var/run/nginx.pid;
  4. events {
  5. worker_connections 1024;
  6. }
  7. http {
  8. include /etc/nginx/mime.types;
  9. access_log /dev/stdout;
  10. server_tokens off;
  11. server {
  12. listen $PORT;
  13. root /app/web;
  14. location / {
  15. index index.php index.html index.htm;
  16. }
  17. location ~ \.php$ {
  18. try_files $uri =404;
  19. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  20. fastcgi_pass 127.0.0.1:9000;
  21. fastcgi_index index.php;
  22. include /etc/nginx/fastcgi_params;
  23. fastcgi_param SCRIPT_FILENAME /app/web/$fastcgi_script_name;
  24. fastcgi_param PATH_INFO $fastcgi_path_info;
  25. }
  26. }
  27. }