nginx.conf 3.0 KB

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