Skip to content

Commit 864a2ec

Browse files
committed
nginx
1 parent 3b470be commit 864a2ec

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed

nginx.conf

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
2+
user root root;
3+
worker_processes 1;
4+
5+
error_log logs/error.log;
6+
#error_log logs/error.log notice;
7+
#error_log logs/error.log info;
8+
9+
pid logs/nginx.pid;
10+
11+
12+
events {
13+
worker_connections 1024;
14+
}
15+
16+
17+
http {
18+
include mime.types;
19+
default_type application/octet-stream;
20+
21+
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22+
# '$status $body_bytes_sent "$http_referer" '
23+
# '"$http_user_agent" "$http_x_forwarded_for"';
24+
25+
#access_log logs/access.log main;
26+
27+
sendfile on;
28+
#tcp_nopush on;
29+
30+
#keepalive_timeout 0;
31+
keepalive_timeout 65;
32+
33+
#gzip on;
34+
upstream tg_server{
35+
server 223.4.85.114:8080 weight=1;
36+
server 223.4.85.114:8088 weight=1;
37+
}
38+
upstream battle{
39+
server 0.0.0.0:8002;
40+
}
41+
server {
42+
listen 8000;
43+
server_name localhost;
44+
45+
#charset koi8-r;
46+
47+
#access_log logs/host.access.log main;
48+
49+
location / {
50+
root html;
51+
index index.html index.htm;
52+
proxy_pass http://tg_server;
53+
}
54+
location ~ /war {
55+
proxy_pass http://battle;
56+
}
57+
#error_page 404 /404.html;
58+
59+
# redirect server error pages to the static page /50x.html
60+
#
61+
error_page 500 502 503 504 /50x.html;
62+
location = /50x.html {
63+
root html;
64+
}
65+
66+
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
67+
#
68+
#location ~ \.php$ {
69+
# proxy_pass http://127.0.0.1;
70+
#}
71+
72+
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
73+
#
74+
#location ~ \.php$ {
75+
# root html;
76+
# fastcgi_pass 127.0.0.1:9000;
77+
# fastcgi_index index.php;
78+
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
79+
# include fastcgi_params;
80+
#}
81+
82+
# deny access to .htaccess files, if Apache's document root
83+
# concurs with nginx's one
84+
#
85+
#location ~ /\.ht {
86+
# deny all;
87+
#}
88+
}
89+
90+
91+
# another virtual host using mix of IP-, name-, and port-based configuration
92+
#
93+
#server {
94+
# listen 8000;
95+
# listen somename:8080;
96+
# server_name somename alias another.alias;
97+
98+
# location / {
99+
# root html;
100+
# index index.html index.htm;
101+
# }
102+
#}
103+
104+
105+
# HTTPS server
106+
#
107+
#server {
108+
# listen 443;
109+
# server_name localhost;
110+
111+
# ssl on;
112+
# ssl_certificate cert.pem;
113+
# ssl_certificate_key cert.key;
114+
115+
# ssl_session_timeout 5m;
116+
117+
# ssl_protocols SSLv2 SSLv3 TLSv1;
118+
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
119+
# ssl_prefer_server_ciphers on;
120+
121+
# location / {
122+
# root html;
123+
# index index.html index.htm;
124+
# }
125+
#}
126+
127+
}

0 commit comments

Comments
 (0)