PageRenderTime 48ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/office/eread/nginx/cnc/nginx.conf

http://jobzhu.googlecode.com/
Config | 669 lines | 510 code | 159 blank | 0 comment | 0 complexity | 0a3a31f78b31aaee5d7b82d5f800462b MD5 | raw file
  1. # $Id: nginx.conf 3 2008-07-03 05:09:25Z jobzhu $
  2. # nginx config file
  3. # zhuzhu@perlchina.org
  4. #
  5. user nobody nobody;
  6. worker_processes 3;
  7. worker_rlimit_nofile 80000;
  8. # [ debug | info | notice | warn | error | crit ]
  9. error_log logs/error.log warn;
  10. #access_log off;
  11. #error_log logs/error.log notice;
  12. #error_log logs/error.log info;
  13. pid logs/nginx.pid;
  14. events {
  15. worker_connections 45000;
  16. # use [ kqueue | rtsig | epoll | /dev/poll | select | poll ];
  17. use epoll;
  18. }
  19. #server_tokens off;
  20. #log_format IP '$remote_addr';
  21. #reset_timeout_connection on;
  22. #listen 0.0.0.0:80 default rcvbuf=8192 sndbuf=16384 backlog=32000 accept_filter=httpready;
  23. http {
  24. include conf/mime.types;
  25. default_type application/octet-stream;
  26. server_names_hash_max_size 512;
  27. server_names_hash_bucket_size 128;
  28. log_format main '$remote_addr - $remote_user [$time_local] $request '
  29. '"$status" $body_bytes_sent "$http_referer" '
  30. '"$http_user_agent" "$http_x_forwarded_for"';
  31. #access_log logs/access.log main;
  32. #access_log off;
  33. sendfile on;
  34. tcp_nopush on;
  35. #keepalive_timeout 0;
  36. client_header_timeout 10m;
  37. client_body_timeout 10m;
  38. send_timeout 10m;
  39. connection_pool_size 512;
  40. client_header_buffer_size 512;
  41. large_client_header_buffers 4 2k;
  42. request_pool_size 4k;
  43. #gzipping all text context
  44. gzip on;
  45. gzip_http_version 1.0;
  46. gzip_min_length 5000;
  47. gzip_buffers 4 8k;
  48. gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  49. gzip_proxied any;
  50. gzip_comp_level 2;
  51. output_buffers 1 32k;
  52. postpone_output 1460;
  53. #sendfile on;
  54. #tcp_nopush on;
  55. tcp_nodelay on;
  56. keepalive_timeout 15 5;
  57. ignore_invalid_headers on;
  58. # include server token
  59. include /usr/local/nginx/conf/server-token.conf;
  60. upstream apache {
  61. server 127.0.0.1:8001;
  62. }
  63. upstream lighttpd {
  64. server 127.0.0.1:8080;
  65. }
  66. upstream squid {
  67. server 127.0.0.1:8000;
  68. }
  69. server {
  70. listen 80;
  71. server_name localhost www.isoshu.com www1.isoshu.com isoshu.com;
  72. location ~ \.(ea|testdna|dna|url|fcgi)$ {
  73. proxy_set_header X-Real-IP $remote_addr;
  74. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  75. proxy_pass http://lighttpd;
  76. }
  77. include /usr/local/nginx/conf/proxy.conf;
  78. #charset koi8-r;
  79. #access_log logs/host.access.log main;
  80. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  81. root /web/club;
  82. expires 3h;
  83. }
  84. location / {
  85. root /web/club;
  86. index index.php index.html index.htm;
  87. include /usr/local/nginx/conf/proxy_fallback.conf;
  88. }
  89. error_page 404 403 http://www.isoshu.com/error.html;
  90. # redirect server error pages to the static page /50x.html
  91. #
  92. #error_page 500 502 503 504 /50x.html;
  93. #location = /50x.html {
  94. # root html;
  95. #}
  96. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  97. #
  98. #location ~ \.php$ {
  99. # proxy_pass http://127.0.0.1;
  100. #}
  101. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  102. #
  103. #location ~ \.php$ {
  104. # fastcgi_pass 127.0.0.1:9000;
  105. # fastcgi_index index.php;
  106. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  107. # include conf/fastcgi_params;
  108. #}
  109. # deny access to .htaccess files, if Apache's document root
  110. # concurs with nginx's one
  111. #
  112. #location ~ /\.ht {
  113. # deny all;
  114. #}
  115. }
  116. server {
  117. listen 80;
  118. server_name en.isoshu.com english.isoshu.com en1.isoshu.com english1.isoshu.com;
  119. include /usr/local/nginx/conf/proxy.conf;
  120. #access_log logs/host.access.log main;
  121. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  122. root /web/EmangaSearch;
  123. expires 3h;
  124. }
  125. location / {
  126. root /web/EmangaSearch;
  127. index index.php index.html index.htm;
  128. include /usr/local/nginx/conf/proxy_fallback.conf;
  129. }
  130. error_page 404 403 http://www.isoshu.com/error.html;
  131. }
  132. server {
  133. listen 80;
  134. server_name comic.isoshu.com comic1.isoshu.com;
  135. include /usr/local/nginx/conf/proxy.conf;
  136. #access_log logs/host.access.log main;
  137. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  138. root /web/comic;
  139. expires 3h;
  140. }
  141. location / {
  142. root /web/comic;
  143. index index.php index.html index.htm;
  144. include /usr/local/nginx/conf/proxy_fallback.conf;
  145. }
  146. error_page 404 403 http://www.isoshu.com/error.html;
  147. }
  148. server {
  149. listen 80;
  150. server_name book.isoshu.com book1.isoshu.com;
  151. include /usr/local/nginx/conf/proxy.conf;
  152. #access_log logs/host.access.log main;
  153. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  154. root /web/book.isoshu.com;
  155. expires 3h;
  156. }
  157. location / {
  158. root /web/book.isoshu.com;
  159. index index.php index.html index.htm;
  160. include /usr/local/nginx/conf/proxy_fallback.conf;
  161. }
  162. error_page 404 403 http://www.isoshu.com/error.html;
  163. }
  164. server {
  165. listen 80;
  166. server_name manga.yuedu365.com www.mangapark.com mangapark.com emanga.isoshu.com manga1.yuedu365.com www1.mangapark.com emanga1.isoshu.com;
  167. include /usr/local/nginx/conf/proxy.conf;
  168. #access_log logs/host.access.log main;
  169. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  170. root /web/manga.yuedu365.com;
  171. expires 3h;
  172. }
  173. location / {
  174. root /web/manga.yuedu365.com;
  175. index index.php index.html index.htm;
  176. include /usr/local/nginx/conf/proxy_fallback.conf;
  177. }
  178. error_page 404 403 http://www.isoshu.com/error.html;
  179. }
  180. server {
  181. listen 80;
  182. server_name facebook.yuedu365.com facebook1.yuedu365.com;
  183. include /usr/local/nginx/conf/proxy.conf;
  184. #access_log logs/host.access.log main;
  185. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  186. root /web/facebook;
  187. expires 3h;
  188. }
  189. location / {
  190. root /web/facebook;
  191. index index.php index.html index.htm;
  192. include /usr/local/nginx/conf/proxy_fallback.conf;
  193. }
  194. error_page 404 403 http://www.isoshu.com/error.html;
  195. }
  196. server {
  197. listen 80;
  198. server_name eshugo.com www.eshugo.com shop.isoshu.com www1.eshugo.com shop1.isoshu.com;
  199. include /usr/local/nginx/conf/proxy.conf;
  200. #access_log logs/host.access.log main;
  201. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  202. root /web/shop;
  203. expires 3h;
  204. }
  205. location / {
  206. root /web/shop;
  207. index index.php index.html index.htm;
  208. include /usr/local/nginx/conf/proxy_fallback.conf;
  209. }
  210. error_page 404 403 http://www.isoshu.com/error.html;
  211. }
  212. server {
  213. listen 80;
  214. server_name novel.isoshu.com novel1.isoshu.com;
  215. include /usr/local/nginx/conf/proxy.conf;
  216. #access_log logs/host.access.log main;
  217. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  218. root /web/novel;
  219. expires 3h;
  220. }
  221. location / {
  222. root /web/novel;
  223. index index.php index.html index.htm;
  224. include /usr/local/nginx/conf/proxy_fallback.conf;
  225. }
  226. error_page 404 403 http://www.isoshu.com/error.html;
  227. }
  228. server {
  229. listen 80;
  230. server_name religion.isoshu.com religion1.isoshu.com;
  231. include /usr/local/nginx/conf/proxy.conf;
  232. #access_log logs/host.access.log main;
  233. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  234. root /web/religion;
  235. expires 3h;
  236. }
  237. location / {
  238. root /web/religion;
  239. index index.php index.html index.htm;
  240. include /usr/local/nginx/conf/proxy_fallback.conf;
  241. }
  242. error_page 404 403 http://www.isoshu.com/error.html;
  243. }
  244. server {
  245. listen 80;
  246. server_name life.isoshu.com life1.isoshu.com;
  247. include /usr/local/nginx/conf/proxy.conf;
  248. #access_log logs/host.access.log main;
  249. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  250. root /web/life;
  251. expires 3h;
  252. }
  253. location / {
  254. root /web/life;
  255. index index.php index.html index.htm;
  256. include /usr/local/nginx/conf/proxy_fallback.conf;
  257. }
  258. error_page 404 403 http://www.isoshu.com/error.html;
  259. }
  260. server {
  261. listen 80;
  262. server_name books.21manager.com business.isoshu.com book.china228.com book.tttz.com book.cdqss.com business1.isoshu.com book1.china228.com book1.cdqss.com book.finance.mop.com;
  263. include /usr/local/nginx/conf/proxy.conf;
  264. #access_log logs/host.access.log main;
  265. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  266. root /web/business2;
  267. expires 3h;
  268. }
  269. location / {
  270. root /web/business2;
  271. index index.php index.html index.htm;
  272. include /usr/local/nginx/conf/proxy_fallback.conf;
  273. }
  274. error_page 404 403 http://www.isoshu.com/error.html;
  275. }
  276. server {
  277. listen 80;
  278. server_name news.isoshu.com news1.isoshu.com;
  279. include /usr/local/nginx/conf/proxy.conf;
  280. #access_log logs/host.access.log main;
  281. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  282. root /web/news;
  283. expires 3h;
  284. }
  285. location / {
  286. root /web/news;
  287. index index.php index.html index.htm;
  288. include /usr/local/nginx/conf/proxy_fallback.conf;
  289. }
  290. error_page 404 403 http://www.isoshu.com/error.html;
  291. }
  292. server {
  293. listen 80;
  294. server_name img2.isoshu.com;
  295. include /usr/local/nginx/conf/proxy.conf;
  296. #access_log logs/host.access.log main;
  297. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  298. root /web/comic-img;
  299. expires 3h;
  300. }
  301. location / {
  302. root /web/comic-img;
  303. index index.php index.html index.htm;
  304. include /usr/local/nginx/conf/proxy_fallback.conf;
  305. }
  306. error_page 404 403 http://www.isoshu.com/error.html;
  307. }
  308. server {
  309. listen 80;
  310. server_name reader.isoshu.com download.stareread.com reader1.isoshu.com download1.stareread.com eread.isoshu.com eread1.isoshu.com;
  311. include /usr/local/nginx/conf/proxy.conf;
  312. #access_log logs/host.access.log main;
  313. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  314. root /web/reader;
  315. expires 3h;
  316. }
  317. location / {
  318. root /web/reader;
  319. index index.php index.html index.htm;
  320. include /usr/local/nginx/conf/proxy_fallback.conf;
  321. }
  322. error_page 404 403 http://www.isoshu.com/error.html;
  323. }
  324. server {
  325. listen 80;
  326. server_name comicadmin1.isoshu.com comicadmin.isoshu.com comicadmin2.isoshu.com;
  327. include /usr/local/nginx/conf/proxy.conf;
  328. #access_log logs/host.access.log main;
  329. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  330. root /web/comic-admin;
  331. expires 3h;
  332. }
  333. location / {
  334. root /web/comic-admin;
  335. index index.php index.html index.htm;
  336. include /usr/local/nginx/conf/proxy_fallback.conf;
  337. }
  338. error_page 404 403 http://www.isoshu.com/error.html;
  339. }
  340. server {
  341. listen 80;
  342. server_name www.stareread.com stareread.com stareread.com.cn www.stareread.com.cn www.starebook.com.cn starebook.com.cn;
  343. include /usr/local/nginx/conf/proxy.conf;
  344. #access_log logs/host.access.log main;
  345. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  346. root /web/stareread;
  347. expires 3h;
  348. }
  349. location / {
  350. root /web/stareread;
  351. index index.php index.html index.htm;
  352. include /usr/local/nginx/conf/proxy_fallback.conf;
  353. }
  354. error_page 404 403 http://www.isoshu.com/error.html;
  355. }
  356. server {
  357. listen 80;
  358. server_name ebook.stareread.com;
  359. include /usr/local/nginx/conf/proxy.conf;
  360. #access_log logs/host.access.log main;
  361. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  362. root /web/ebookstareread;
  363. expires 3h;
  364. }
  365. location / {
  366. root /web/ebookstareread;
  367. index index.php index.html index.htm;
  368. include /usr/local/nginx/conf/proxy_fallback.conf;
  369. }
  370. error_page 404 403 http://www.isoshu.com/error.html;
  371. }
  372. server {
  373. listen 80;
  374. server_name pma1.x.com pma.tw.com;
  375. include /usr/local/nginx/conf/proxy.conf;
  376. #access_log logs/host.access.log main;
  377. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|zip|html?|js|css)$ {
  378. root /web/pma;
  379. expires 3h;
  380. }
  381. location / {
  382. root /web/pma;
  383. index index.php index.html index.htm;
  384. include /usr/local/nginx/conf/proxy_fallback.conf;
  385. }
  386. }
  387. server {
  388. listen 80;
  389. server_name update.isoshu.com update1.isoshu.com;
  390. include /usr/local/nginx/conf/proxy.conf;
  391. #access_log logs/host.access.log main;
  392. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|ico|html?|js|css)$ {
  393. root /web/update.isoshu.com;
  394. expires 3h;
  395. }
  396. location / {
  397. root /web/update.isoshu.com;
  398. index index.php index.html index.htm;
  399. include /usr/local/nginx/conf/proxy_fallback.conf;
  400. }
  401. error_page 404 403 http://www.isoshu.com/error.html;
  402. }
  403. server {
  404. listen 80;
  405. server_name mobile.isoshu.com mobile1.isoshu.com;
  406. include /usr/local/nginx/conf/proxy.conf;
  407. #access_log logs/host.access.log main;
  408. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|zip|ico|html?|js|css)$ {
  409. root /web/mobile.isoshu.com/htdocs;
  410. expires 3h;
  411. }
  412. location / {
  413. root /web/mobile.isoshu.com/htdocs;
  414. index index.php index.html index.htm;
  415. include /usr/local/nginx/conf/proxy_fallback.conf;
  416. location ~ ^/admincp/ {
  417. proxy_pass http://apache;
  418. }
  419. }
  420. error_page 404 403 http://www.isoshu.com/error.html;
  421. }
  422. server {
  423. listen 80;
  424. server_name help.isoshu.com help1.isoshu.com;
  425. include /usr/local/nginx/conf/proxy.conf;
  426. #access_log logs/host.access.log main;
  427. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|zip|ico|html?|js|css)$ {
  428. root /web/help.isoshu.com;
  429. expires 3h;
  430. }
  431. location / {
  432. root /web/help.isoshu.com;
  433. index index.php index.html index.htm;
  434. include /usr/local/nginx/conf/proxy_fallback.conf;
  435. }
  436. error_page 404 403 http://www.isoshu.com/error.html;
  437. }
  438. server {
  439. listen 80;
  440. server_name adcenter.isoshu.com readonline.isoshu.com;
  441. include /usr/local/nginx/conf/proxy-lighttpd.conf;
  442. #access_log logs/host.access.log main;
  443. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|zip|ico|html?|js|css)$ {
  444. root /web/club;
  445. expires 3h;
  446. }
  447. location / {
  448. root /web/club;
  449. index index.php index.html index.htm;
  450. include /usr/local/nginx/conf/proxy_fallback-lighttpd.conf;
  451. }
  452. error_page 404 403 http://www.isoshu.com/error.html;
  453. }
  454. server {
  455. listen 80;
  456. server_name coverpic.isoshu.com;
  457. location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
  458. root /web/coverpic.isoshu.com;
  459. expires 3h;
  460. }
  461. #access_log logs/host.access.log main;
  462. error_page 404 403 http://www.isoshu.com/error.html;
  463. }
  464. server {
  465. listen 80;
  466. server_name chapter.isoshu.com chapter1.isoshu.com;
  467. include /usr/local/nginx/conf/proxy-apache.conf;
  468. #access_log logs/host.access.log main;
  469. location ~* ^.+.(jpe?g|gif|swf|bmp|exe|txt|png|zip|ico|html?|js|css)$ {
  470. root /web/chapter.isoshu.com;
  471. expires 3h;
  472. }
  473. location / {
  474. root /web/chapter.isoshu.com;
  475. index index.php index.html index.htm;
  476. include /usr/local/nginx/conf/proxy_fallback-apache.conf;
  477. }
  478. error_page 404 403 http://www.isoshu.com/error.html;
  479. }
  480. # Include own virtual servers
  481. include /usr/local/nginx/conf/vhosts.conf;
  482. # another virtual host using mix of IP-, name-, and port-based configuration
  483. #
  484. #server {
  485. # listen 8000;
  486. # listen somename:8080;
  487. # server_name somename alias another.alias;
  488. # location / {
  489. # root html;
  490. # index index.html index.htm;
  491. # }
  492. #}
  493. # HTTPS server
  494. #
  495. #server {
  496. # listen 443;
  497. # server_name localhost;
  498. # ssl on;
  499. # ssl_certificate cert.pem;
  500. # ssl_certificate_key cert.key;
  501. # ssl_session_timeout 5m;
  502. # ssl_protocols SSLv2 SSLv3 TLSv1;
  503. # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
  504. # ssl_prefer_server_ciphers on;
  505. # location / {
  506. # root html;
  507. # index index.html index.htm;
  508. # }
  509. #}
  510. }