/office/eread/nginx/nginx.conf
Config | 780 lines | 596 code | 184 blank | 0 comment | 0 complexity | 150f5674ffc42d0509e6baf4e96aba03 MD5 | raw file
- # $Id: nginx.conf 24 2010-09-09 01:59:56Z fred1982@gmail.com $
- # nginx config file
- # zhuzhu@perlchina.org
- #
- user nobody nobody;
- worker_processes 3;
- worker_rlimit_nofile 80000;
- # [ debug | info | notice | warn | error | crit ]
- error_log logs/error.log warn;
- # access_log /dev/null;
- #error_log logs/error.log notice;
- #error_log logs/error.log info;
- pid logs/nginx.pid;
- events {
- worker_connections 45000;
- # use [ kqueue | rtsig | epoll | /dev/poll | select | poll ];
- use epoll;
- }
- #server_tokens off;
- #log_format IP '$remote_addr';
- #reset_timeout_connection on;
- #listen 0.0.0.0:80 default rcvbuf=8192 sndbuf=16384 backlog=32000 accept_filter=httpready;
- http {
- include conf/mime.types;
- default_type application/octet-stream;
- log_format main '$remote_addr - $remote_user [$time_local] $request '
- '"$status" $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- #access_log logs/access.log main;
- #access_log off;
- sendfile on;
- tcp_nopush on;
- #keepalive_timeout 0;
- client_header_timeout 10m;
- client_body_timeout 10m;
- send_timeout 10m;
- connection_pool_size 512;
- client_header_buffer_size 512;
- large_client_header_buffers 4 2k;
- request_pool_size 4k;
- #gzipping all text context
- gzip on;
- gzip_http_version 1.0;
- gzip_min_length 5000;
- gzip_buffers 4 8k;
- gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
- gzip_proxied any;
- gzip_comp_level 2;
- output_buffers 1 32k;
- postpone_output 1460;
- #sendfile on;
- #tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 15 5;
- ignore_invalid_headers on;
- include /usr/local/nginx/conf/server-token.conf;
- upstream apache {
- server 127.0.0.1:8001;
- }
- upstream lighttpd {
- server 127.0.0.1:8080;
- }
- upstream squid {
- server 127.0.0.1:8000;
- }
- upstream lbsearch {
- server 192.168.1.26:8080 weight=5;
- server 192.168.1.24:8080 weight=4;
- }
- server {
- listen 80;
- server_name localhost www.isoshu.com isoshu.com;
- location ~ \.(ea|dna|testdna|url|fcgi)$ {
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://lighttpd;
- }
- # include /usr/local/nginx/conf/rewrite-index-url.conf;
- include /usr/local/nginx/conf/proxy.conf;
- #charset koi8-r;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/club;
- expires 3h;
- }
- location / {
- root /web/club;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- location /lbsearch {
- proxy_pass http://lbsearch/;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- # redirect server error pages to the static page /50x.html
- #
- #error_page 500 502 503 504 /50x.html;
- #location = /50x.html {
- # root html;
- #}
- # proxy the PHP scripts to Apache listening on 127.0.0.1:80
- #
- #location ~ \.php$ {
- # proxy_pass http://127.0.0.1;
- #}
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- #location ~ \.php$ {
- # fastcgi_pass 127.0.0.1:9000;
- # fastcgi_index index.php;
- # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
- # include conf/fastcgi_params;
- #}
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- #location ~ /\.ht {
- # deny all;
- #}
- }
- server {
- listen 80;
- server_name tel.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/telclub;
- expires 3h;
- }
- location / {
- root /web/telclub;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name en.isoshu.com english.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/EmangaSearch;
- expires 3h;
- }
- location / {
- root /web/EmangaSearch;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name comic.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/comic;
- expires 3h;
- }
- location / {
- root /web/comic;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name book.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/book.isoshu.com;
- expires 3h;
- }
- location / {
- root /web/book.isoshu.com;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name manga.yuedu365.com www.mangapark.com mangapark.com emanga.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/manga.yuedu365.com;
- expires 3h;
- }
- location / {
- root /web/manga.yuedu365.com;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name facebook.yuedu365.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/facebook;
- expires 3h;
- }
- location / {
- root /web/facebook;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name eshugo.com www.eshugo.com shop.isoshu.com;
- include /usr/local/nginx/conf/proxy-apache.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/shop;
- expires 3h;
- }
- location / {
- root /web/shop;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback-apache.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name novel.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/novel;
- expires 3h;
- }
- location / {
- root /web/novel;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name religion.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/religion;
- expires 3h;
- }
- location / {
- root /web/religion;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name life.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/life;
- expires 3h;
- }
- location / {
- root /web/life;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name business.isoshu.com book.china228.com book.tttz.com book.cdqss.com books.21manager.com books.cdqss.com reader.zxw114.com books.shangjie.biz book.d3kt.cn www.hnce.com comic.i8610.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/business2;
- expires 3h;
- }
- location / {
- root /web/business2;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name news.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/news;
- expires 3h;
- }
- location / {
- root /web/news;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name img1.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/comic-img;
- expires 3h;
- }
- location / {
- root /web/comic-img;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name reader.isoshu.com download.stareread.com eread.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/reader;
- expires 3h;
- }
- location / {
- root /web/reader;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name comicadmin1.isoshu.com comicadmin.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/comic-admin;
- expires 3h;
- }
- location / {
- root /web/comic-admin;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name www.stareread.com stareread.com stareread.com.cn www.stareread.com.cn www.starebook.com.cn starebook.com.cn;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/stareread;
- expires 3h;
- }
- location / {
- root /web/stareread;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name ebook.stareread.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/ebookstareread;
- expires 3h;
- }
- location / {
- root /web/ebookstareread;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name pma.x.com;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|zip|html?|js|css)$ {
- root /web/pma;
- expires 3h;
- }
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location / {
- root /web/pma;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name update.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|ico|html?|js|css)$ {
- root /web/update.isoshu.com;
- expires 3h;
- }
- location / {
- root /web/update.isoshu.com;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name mobile.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/mobile.isoshu.com/htdocs;
- expires 3h;
- }
- location / {
- root /web/mobile.isoshu.com/htdocs;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- location ~ ^/admincp/ {
- proxy_pass http://apache;
- }
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name help.isoshu.com;
- include /usr/local/nginx/conf/proxy.conf;
- #access_log logs/host.access.log main;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/help.isoshu.com;
- expires 3h;
- }
- location / {
- root /web/help.isoshu.com;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name ecount.isoshu.com adcenter.isoshu.com;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/club;
- expires 3h;
- }
-
- include /usr/local/nginx/conf/proxy-lighttpd.conf;
- #access_log logs/host.access.log main;
- location / {
- root /web/club;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback-lighttpd.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name ads.isoshu.com diy.isoshu.com diyads.isoshu.com;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/ads.isoshu.com;
- expires 3h;
- }
-
- include /usr/local/nginx/conf/proxy-apache.conf;
- #access_log logs/host.access.log main;
- location / {
- root /web/ads.isoshu.com;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback-apache.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
-
- server {
- listen 80;
- server_name dna.isoshu.com;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/dna.isoshu.com/htdocs;
- expires 3h;
- }
-
- include /usr/local/nginx/conf/proxy-apache.conf;
- #access_log logs/host.access.log main;
- location / {
- root /web/dna.isoshu.com/htdocs;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback-apache.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name readonline.isoshu.com;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/club;
- expires 3h;
- }
-
- include /usr/local/nginx/conf/proxy-lighttpd.conf;
- #access_log logs/host.access.log main;
- location / {
- root /web/club;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback-lighttpd.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name coverpic.isoshu.com;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/coverpic.isoshu.com;
- expires 3h;
- }
-
- #access_log logs/host.access.log main;
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name chapter.isoshu.com;
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/chapter.isoshu.com;
- expires 3h;
- }
-
- include /usr/local/nginx/conf/proxy-apache.conf;
- #access_log logs/host.access.log main;
- location / {
- root /web/chapter.isoshu.com;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback-apache.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- server {
- listen 80;
- server_name bookbar.isoshu.com;
-
- location ~* ^.+.(jpe?g|gif|swf|bmp|txt|exe|mp3|rar|png|zip|ico|html?|js|css)$ {
- root /web/bookbar.isoshu.com;
- expires 3h;
- }
-
- include /usr/local/nginx/conf/proxy-apache.conf;
- #access_log logs/host.access.log main;
- location / {
- root /web/bookbar.isoshu.com;
- index index.php index.html index.htm;
- include /usr/local/nginx/conf/proxy_fallback-apache.conf;
- }
- error_page 404 403 http://www.isoshu.com/error.html;
- }
- # add vhost
- include /usr/local/nginx/conf/vhosts.conf;
- # another virtual host using mix of IP-, name-, and port-based configuration
- #
- #server {
- # listen 8000;
- # listen somename:8080;
- # server_name somename alias another.alias;
- # location / {
- # root html;
- # index index.html index.htm;
- # }
- #}
- # HTTPS server
- #
- #server {
- # listen 443;
- # server_name localhost;
- # ssl on;
- # ssl_certificate cert.pem;
- # ssl_certificate_key cert.key;
- # ssl_session_timeout 5m;
- # ssl_protocols SSLv2 SSLv3 TLSv1;
- # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
- # ssl_prefer_server_ciphers on;
- # location / {
- # root html;
- # index index.html index.htm;
- # }
- #}
- }