nginx.conf 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. #user nobody;
  2. worker_processes 8;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. error_log stderr error;
  7. #pid logs/nginx.pid;
  8. events {
  9. worker_connections 1024;
  10. }
  11. http {
  12. include /usr/local/nginx/conf/mime.types;
  13. default_type application/octet-stream;
  14. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  15. # '$status $body_bytes_sent "$http_referer" '
  16. # '"$http_user_agent" "$http_x_forwarded_for"';
  17. #access_log logs/access.log main;
  18. access_log off;
  19. sendfile on;
  20. #tcp_nopush on;
  21. #keepalive_timeout 0;
  22. keepalive_timeout 65;
  23. #gzip on;
  24. upstream fastcgi_backend {
  25. server 127.0.0.1:9001;
  26. keepalive 32;
  27. }
  28. server {
  29. listen 8080;
  30. server_name localhost;
  31. #charset koi8-r;
  32. #access_log logs/host.access.log main;
  33. #location / {
  34. # root html;
  35. # index index.html index.htm;
  36. #}
  37. #error_page 404 /404.html;
  38. # redirect server error pages to the static page /50x.html
  39. #
  40. #error_page 500 502 503 504 /50x.html;
  41. #location = /50x.html {
  42. # root html;
  43. #}
  44. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  45. #
  46. #location ~ \.php$ {
  47. # proxy_pass http://127.0.0.1;
  48. #}
  49. root /home/tfb/FrameworkBenchmarks/php-symfony2/web/;
  50. index app.php;
  51. location / {
  52. try_files $uri $uri/ /app.php?$uri&$args;
  53. }
  54. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  55. #
  56. location ~ \.php$ {
  57. try_files $uri =404;
  58. fastcgi_pass fastcgi_backend;
  59. fastcgi_keep_conn on;
  60. fastcgi_index index.php;
  61. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  62. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  63. include /usr/local/nginx/conf/fastcgi_params;
  64. }
  65. # deny access to .htaccess files, if Apache's document root
  66. # concurs with nginx's one
  67. #
  68. #location ~ /\.ht {
  69. # deny all;
  70. #}
  71. }
  72. # another virtual host using mix of IP-, name-, and port-based configuration
  73. #
  74. #server {
  75. # listen 8000;
  76. # listen somename:8080;
  77. # server_name somename alias another.alias;
  78. # location / {
  79. # root html;
  80. # index index.html index.htm;
  81. # }
  82. #}
  83. # HTTPS server
  84. #
  85. #server {
  86. # listen 443;
  87. # server_name localhost;
  88. # ssl on;
  89. # ssl_certificate cert.pem;
  90. # ssl_certificate_key cert.key;
  91. # ssl_session_timeout 5m;
  92. # ssl_protocols SSLv2 SSLv3 TLSv1;
  93. # ssl_ciphers HIGH:!aNULL:!MD5;
  94. # ssl_prefer_server_ciphers on;
  95. # location / {
  96. # root html;
  97. # index index.html index.htm;
  98. # }
  99. #}
  100. }