| 1 |
|
|---|
| 2 | #user nobody;
|
|---|
| 3 | worker_processes 1;
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | events {
|
|---|
| 7 | worker_connections 1024;
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 | http {
|
|---|
| 12 | include mime.types;
|
|---|
| 13 | default_type application/octet-stream;
|
|---|
| 14 |
|
|---|
| 15 | log_format main '[$time_local] $status "$request"';
|
|---|
| 16 | access_log logs/access.log main;
|
|---|
| 17 | error_log logs/error.log debug;
|
|---|
| 18 |
|
|---|
| 19 | sendfile on;
|
|---|
| 20 | #tcp_nopush on;
|
|---|
| 21 |
|
|---|
| 22 | upstream bwserver {
|
|---|
| 23 | server 127.0.0.1:2000 max_fails=50 fail_timeout=30s;
|
|---|
| 24 | # keepalive 1000;
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | upstream bwstore {
|
|---|
| 28 | server 127.0.0.1:2001 max_fails=50 fail_timeout=30s;
|
|---|
| 29 | # keepalive 1000;
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 | server {
|
|---|
| 34 | listen 80;
|
|---|
| 35 | listen 443 ssl;
|
|---|
| 36 |
|
|---|
| 37 | server_name bitwordy.com;
|
|---|
| 38 |
|
|---|
| 39 | keepalive_disable none;
|
|---|
| 40 | keepalive_requests 500;
|
|---|
| 41 | keepalive_timeout 45;
|
|---|
| 42 |
|
|---|
| 43 | #ssl on;
|
|---|
| 44 | ssl_certificate C:/nginx/xj34m/server.crt;
|
|---|
| 45 | ssl_certificate_key C:/nginx/xj34m/server.key;
|
|---|
| 46 |
|
|---|
| 47 | ssl_protocols SSLv2 SSLv3 TLSv1;
|
|---|
| 48 | #ssl_ciphers HIGH:!aNULL:!MD5:!kEDH;
|
|---|
| 49 | ssl_ciphers ALL:!aNULL:!ADH:!kEDH:!eNULL:!MEDIUM:!LOW:!EXP;
|
|---|
| 50 | ssl_prefer_server_ciphers on;
|
|---|
| 51 |
|
|---|
| 52 | ssl_session_cache builtin:1000;
|
|---|
| 53 | #ssl_session_cache shared:SSL:10m;
|
|---|
| 54 | ssl_session_timeout 10m;
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 | location / {
|
|---|
| 58 | root c:/webroot;
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | location /bitwordy/i/ {
|
|---|
| 62 | root c:/webroot;
|
|---|
| 63 | expires 100d;
|
|---|
| 64 | }
|
|---|
| 65 |
|
|---|
| 66 | location /bitwordy/js/ {
|
|---|
| 67 | root c:/webroot;
|
|---|
| 68 | rewrite /bitwordy/js/([0-9]+)/(.+)$ /bitwordy/js/$2 break;
|
|---|
| 69 | return 404;
|
|---|
| 70 | }
|
|---|
| 71 |
|
|---|
| 72 | location /bitwordy/jso/ {
|
|---|
| 73 | root c:/webroot;
|
|---|
| 74 | expires 48h;
|
|---|
| 75 | rewrite /bitwordy/jso/([0-9]+)/(.+)$ /bitwordy/jso/$2 break;
|
|---|
| 76 | return 404;
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | location /bw/ {
|
|---|
| 80 | root c:/webroot;
|
|---|
| 81 | index bwserver.exe;
|
|---|
| 82 |
|
|---|
| 83 | fastcgi_pass bwserver;
|
|---|
| 84 | # fastcgi_keep_conn on;
|
|---|
| 85 |
|
|---|
| 86 | fastcgi_pass_request_headers off;
|
|---|
| 87 | fastcgi_param HTTP_COOKIE $http_cookie;
|
|---|
| 88 | fastcgi_param QUERY_STRING $query_string;
|
|---|
| 89 | fastcgi_param SCHEME $scheme;
|
|---|
| 90 | }
|
|---|
| 91 |
|
|---|
| 92 | location /bwstore/ {
|
|---|
| 93 | root c:/webroot;
|
|---|
| 94 | index bwstore.exe;
|
|---|
| 95 |
|
|---|
| 96 | fastcgi_pass bwstore;
|
|---|
| 97 | # fastcgi_keep_conn on;
|
|---|
| 98 |
|
|---|
| 99 | fastcgi_pass_request_headers off;
|
|---|
| 100 | fastcgi_param HTTP_COOKIE $http_cookie;
|
|---|
| 101 | fastcgi_param QUERY_STRING $query_string;
|
|---|
| 102 | fastcgi_param SCHEME $scheme;
|
|---|
| 103 | }
|
|---|
| 104 | }
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | }
|
|---|