Created
October 23, 2013 06:55
-
-
Save lajunta/7113756 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream dc { | |
server localhost:9090; | |
#server unix:/tmp/dc.sock max_fails=3 fail_timeout=60s; | |
} | |
server{ | |
access_log /var/log/nginx/access_kpy.log main; | |
error_log /var/log/nginx/error_kpy.log; | |
listen 80; | |
charset utf-8; | |
server_name kpy.lwqzx.net; | |
index index.html index.htm index.php; | |
location / { | |
root /data/sites; | |
index index.html index.htm index.php; | |
if ($request_filename ~* ".(ico|css|js|gif|jpe?g|png|swf|svg|ttf|eot|woff)$") { expires 5m; break; } | |
} | |
location /data/sites/ { | |
internal; | |
alias /; | |
} | |
location /kpy/static/ { | |
alias /data/static/ ; | |
add_header Cache-Control public; | |
add_header ETag ""; | |
break; | |
} | |
location ^~ /kpy/sapi/ { | |
proxy_pass http://172.16.1.12:9000; | |
} | |
location ^~ /kpy/yixin/ { | |
proxy_pass http://172.16.1.12:6666; | |
} | |
location ^~ /kpy/nilcast/somachi/ { | |
proxy_pass http://172.16.1.12:6667; | |
} | |
location ^~ /kpy/weixin/ { | |
proxy_pass http://172.16.1.12:7777; | |
} | |
location ^~ /kpy/jsj111 { | |
proxy_pass http://172.16.14.245/jsj111; | |
} | |
location ^~ /kpy/tb/ { | |
proxy_pass http://172.16.1.212:8081; | |
} | |
location ^~ /kpy/tiku/ { | |
proxy_pass http://172.16.1.212:8082; | |
} | |
#location ^~ /kpy/pe/ { | |
# proxy_pass http://localhost:8088; | |
#} | |
location ^~ /kpy/a/ { | |
proxy_pass http://172.16.1.212:8083; | |
} | |
location ^~ /kpy/b/ { | |
proxy_pass http://172.16.1.212:8888; | |
} | |
location /kpy/dc/assets/ { | |
alias /data/sites/dc/public/kpy/dc/assets/; | |
# #expires 30d; | |
add_header Cache-Control public; | |
add_header ETag ""; | |
break; | |
} | |
location /kpy/dc/gsites/ { | |
alias /data/gsites/ ; | |
add_header Cache-Control public; | |
add_header ETag ""; | |
break; | |
} | |
location ^~ /kpy/dc/ { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_set_header X-Sendfile-Type X-Accel-Redirect; | |
#proxy_set_header X-Accel-Mapping /videos/=/videos/; | |
proxy_buffer_size 64k; | |
proxy_buffers 32 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_connect_timeout 600; | |
proxy_read_timeout 600; | |
proxy_send_timeout 600; | |
#proxy_pass http://dc; | |
proxy_pass http://localhost:9090; | |
} | |
#location /videos/ { | |
# internal; | |
# alias /videos/; | |
#} | |
location /gsites/ { | |
alias /backup/gsites/ ; | |
add_header Cache-Control public; | |
add_header ETag ""; | |
break; | |
} | |
location /kpy/soft/ { | |
aio on; | |
sendfile on; | |
alias /data/soft/; | |
} | |
location /torrents/ { | |
autoindex on; | |
aio on; | |
sendfile on; | |
alias /srv/ftp/torrents/; | |
} | |
location ^~ /kpy/ { | |
proxy_pass http://172.16.1.212:8080; | |
} | |
#error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 | |
# 500 501 502 503 504 505 506 507 /error_page.html; | |
#location /error_page.html { | |
# internal; | |
#} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment