nginx.conf 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #user nobody;
  2. worker_processes 1;
  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 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;
  17. sendfile on;
  18. #tcp_nopush on;
  19. #keepalive_timeout 0;
  20. keepalive_timeout 65;
  21. #gzip on;
  22. server {
  23. listen 8042;
  24. server_name localhost;
  25. #charset koi8-r;
  26. #access_log logs/host.access.log main;
  27. location / {
  28. root html;
  29. index index.html index.htm;
  30. }
  31. #error_page 404 /404.html;
  32. # redirect server error pages to the static page /50x.html
  33. #
  34. error_page 500 502 503 504 /50x.html;
  35. location = /50x.html {
  36. root html;
  37. }
  38. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  39. #
  40. #location ~ \.php$ {
  41. # proxy_pass http://127.0.0.1;
  42. #}
  43. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  44. #
  45. #location ~ \.php$ {
  46. # root html;
  47. # fastcgi_pass 127.0.0.1:9000;
  48. # fastcgi_index index.php;
  49. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  50. # include fastcgi_params;
  51. #}
  52. # deny access to .htaccess files, if Apache's document root
  53. # concurs with nginx's one
  54. #
  55. #location ~ /\.ht {
  56. # deny all;
  57. #}
  58. }
  59. server {
  60. listen 8002;
  61. server_name lims_frontend;
  62. #charset koi8-r;
  63. #access_log /var/log/nginx/host.access.log;
  64. #error_log /var/log/nginx/error.log;
  65. location / {
  66. root /usr/share/nginx/html;
  67. index index.html index.htm;
  68. try_files $uri $uri/ /index,html;
  69. }
  70. location /api {
  71. #add_header Cache-Control no-cache;
  72. proxy_pass http://172.26.0.14:8003/api;
  73. proxy_read_timeout 120s;
  74. proxy_connect_timeout 180s;
  75. proxy_send_timeout 180s;
  76. client_max_body_size 200m;
  77. }
  78. }
  79. # another virtual host using mix of IP-, name-, and port-based configuration
  80. #
  81. #server {
  82. # listen 8000;
  83. # listen somename:8080;
  84. # server_name somename alias another.alias;
  85. # location / {
  86. # root html;
  87. # index index.html index.htm;
  88. # }
  89. #}
  90. # HTTPS server
  91. #
  92. #server {
  93. # listen 443 ssl;
  94. # server_name localhost;
  95. # ssl_certificate cert.pem;
  96. # ssl_certificate_key cert.key;
  97. # ssl_session_cache shared:SSL:1m;
  98. # ssl_session_timeout 5m;
  99. # ssl_ciphers HIGH:!aNULL:!MD5;
  100. # ssl_prefer_server_ciphers on;
  101. # location / {
  102. # root html;
  103. # index index.html index.htm;
  104. # }
  105. #}
  106. }