nginx.conf 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. }
  27. server {
  28. listen 8080;
  29. server_name localhost;
  30. #charset koi8-r;
  31. #access_log logs/host.access.log main;
  32. #location / {
  33. # root html;
  34. # index index.html index.htm;
  35. #}
  36. #error_page 404 /404.html;
  37. # redirect server error pages to the static page /50x.html
  38. #
  39. #error_page 500 502 503 504 /50x.html;
  40. #location = /50x.html {
  41. # root html;
  42. #}
  43. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  44. #
  45. #location ~ \.php$ {
  46. # proxy_pass http://127.0.0.1;
  47. #}
  48. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  49. #
  50. location ~ \.php$ {
  51. root TEST_ROOT;
  52. fastcgi_pass fastcgi_backend;
  53. # fastcgi_pass 127.0.0.1:9001;
  54. fastcgi_index index.php;
  55. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  56. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  57. include /usr/local/nginx/conf/fastcgi_params;
  58. }
  59. # deny access to .htaccess files, if Apache's document root
  60. # concurs with nginx's one
  61. #
  62. #location ~ /\.ht {
  63. # deny all;
  64. #}
  65. }
  66. # another virtual host using mix of IP-, name-, and port-based configuration
  67. #
  68. #server {
  69. # listen 8000;
  70. # listen somename:8080;
  71. # server_name somename alias another.alias;
  72. # location / {
  73. # root html;
  74. # index index.html index.htm;
  75. # }
  76. #}
  77. # HTTPS server
  78. #
  79. #server {
  80. # listen 443;
  81. # server_name localhost;
  82. # ssl on;
  83. # ssl_certificate cert.pem;
  84. # ssl_certificate_key cert.key;
  85. # ssl_session_timeout 5m;
  86. # ssl_protocols SSLv2 SSLv3 TLSv1;
  87. # ssl_ciphers HIGH:!aNULL:!MD5;
  88. # ssl_prefer_server_ciphers on;
  89. # location / {
  90. # root html;
  91. # index index.html index.htm;
  92. # }
  93. #}
  94. }