nginx.conf 3.4 KB

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