nginx.conf
user nginx; pid /var/run/nginx.pid;worker_processes 8;
worker_rlimit_nofile 102400;
events {
use epoll;
worker_connections 102400;
}http {
passenger_root /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.20;
passenger_ruby /usr/local/rvm/gems/ruby-1.9.3-p551/bin/ruby;
include mime.types; charset utf-8; 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" ' '"$gzip_ratio" $request_time $bytes_sent $request_length';
log_format srcache_log 'remote_addr - remote_user [time_local] "request" '
'"status" body_bytes_sent request_time bytes_sent $request_length '
'"[upstream_response_time] [srcache_fetch_status] [srcache_store_status] [srcache_expire]';
set_real_ip_from 10.0.0.0/8; real_ip_header X-Forwarded-For; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Headers X-Requested-With; add_header Access-Control-Allow-Methods GET,POST,OPTIONS; include /etc/nginx/gzip.conf; include /etc/nginx/proxy.conf; server_names_hash_max_size 512; server_names_hash_bucket_size 128; sendfile on; fastcgi_intercept_errors on; keepalive_timeout 650; include /etc/nginx/vhosts/*.conf; include /etc/nginx/vhosts/stock/*.conf; include /etc/nginx/vhosts/cyw/*.conf; include /etc/nginx/vhosts/baye8/*.conf; include /etc/nginx/vhosts/60/*.conf; server { listen 80; server_name localhost; root /usr/share/nginx/html; location / { index index.html index.htm index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~/\.ht { deny all; } }
include /etc/nginx/vhosts/*.conf;
}
proxy.conf
#!nginx (-) # proxy.conf fastcgi_buffers 32 8k; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 1024m; client_body_buffer_size 128k; proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; proxy_buffer_size 16k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_temp_file_write_size 128k; proxy_temp_path /tmp/nginx/temp; proxy_cache_path /tmp/nginx/cache levels=1:2 keys_zone=cache_zone:2048M inactive=1d max_size=20g; proxy_headers_hash_max_size 512000; proxy_headers_hash_bucket_size 64000;
gzip.conf
gzip on; # gzip_http_version 1.1; gzip_disable "MSIE [1-6]\."; #gzip_disable "Mozilla/4"; gzip_static on; gzip_comp_level 4; gzip_proxied any; gzip_vary on; gzip_buffers 4 16k; gzip_min_length 1100; gzip_types text/plain text/xml text/css application/xml application/xhtml+xml application/rss+xml application/atom_xml application/javascript application/x-javascript;
vhosts.conf
upstream mall-cms.messandbox.com { server 127.0.0.1:7791; }upstream mall-info.messandbox.com {
server 127.0.0.1:7791;
}upstream mall-my.messandbox.com {
server 127.0.0.1:7791;
}upstream mall-search.messandbox.com {
server 127.0.0.1:7791;
}upstream mall-pay.messandbox.com {
server 127.0.0.1:7791;
}upstream mall-sc.messandbox.com {
server 127.0.0.1:7791;
}upstream mall-open.messandbox.com {
server 127.0.0.1:7791;
}upstream mall-common.messandbox.com {
server 127.0.0.1:7791;
}upstream mall-cs.messandbox.com {
server 127.0.0.1:7791;
}upstream mall-c.messandbox.com {
server 127.0.0.1:7791;
}#server {
listen 80;
server_name www.ecec.com;
#access_log /data/logs/b2c2c/access.log main;
location / {
root /data/zte/www/html/ecec;
index index/index.html index/index.htm;
}
#}
server {
listen 80;
server_name mall-ad.messandbox.com;proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { root /data/zte/www/cms/systemCode/publish/www/advert; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
}
server {
listen 80;
server_name mall-so.messandbox.com;
charset utf-8;#access_log /data/logs/b2c2c/access_b_so.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { root /data/zte/www/static/ecoeco; index index.html index.htm; }
}
server {
listen 80;
server_name mall-se.messandbox.com;#access_log /data/logs/b2c2c/access_b_se.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { root /data/zte/www/static/ecec; index index.html index.htm; }
}
server {
listen 80;
server_name mall-img.messandbox.com;#access_log /data/logs/b2c2c/access_b_img.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { root /data/zte/www/img; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
}
server {
listen 80;
server_name mall-oimg.messandbox.com;#access_log /data/logs/b2c2c/access_b_img.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { root /data/zte/www/img-bak; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
}
server {
listen 80;
server_name mall-my.messandbox.com;#access_log /data/logs/b2c2c/access_b_my.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-my.messandbox.com; }
}
server {
listen 80;
server_name mall-pay.messandbox.com;#access_log /data/logs/b2c2c/access_b_pay.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-pay.messandbox.com; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
}
server {
listen 80;
server_name mall-search.messandbox.com;#access_log /data/logs/b2c2c/access_b_search.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-search.messandbox.com; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
}
server {
listen 80;
server_name mall-info.messandbox.com;#access_log /data/logs/b2c2c/access_b_info.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-info.messandbox.com; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
}
server {
listen 80;
server_name mall-sc.messandbox.com;#access_log /data/logs/b2c2c/access_b_sc.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-sc.messandbox.com; }
}
server {
listen 80;
server_name mall-open.messandbox.com;#access_log /data/logs/b2c2c/access_b_open.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-open.messandbox.com; } location ~/sindex { root /data/zte/www/html/b2c2c; index sindex.html; }
}
server {
listen 80;
server_name mall-cms.messandbox.com;#access_log /data/logs/b2c2c/access_b_cms.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-cms.messandbox.com; }
}
server {
listen 80;
server_name mall-common.messandbox.com;#access_log /data/logs/b2c2c/access_b_common.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-common.messandbox.com; }
}
server {
listen 80;
server_name mall-cs.messandbox.com;#access_log /data/logs/b2c2c/access_b_cs.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-cs.messandbox.com; }
}
server {
listen 80;
server_name mall-www.messandbox.com;
#access_log /data/logs/b2c2c/access_b_mall.log main;
error_page 404 = /404.html;
location / {
root /data/zte/www/html/b2c2c;
index sindex/sindex.html sindex/sindex.htm;
}
location /* {
error_page 404 = /404.html;
}
}server {
listen 80;
server_name mall-s.messandbox.com;#access_log /data/logs/b2c2c/access_b_mall.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { root /data/zte/www/static/b2c2c; index index.html index.htm; }
}
server {
listen 80;
server_name mall-c.messandbox.com;#access_log /data/logs/b2c2c/access_b_mall.log main; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://mall-c.messandbox.com; }
}
server {
listen 80;
server_name mall-download.messandbox.com;proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { root /data/zte/www/downloads; index index.html index.htm; }
}
tomcat_catalina.sh
JAVA_OPTS='-server -Xms2048m -Xmx2048m -Xss256k -XX:MaxNewSize=256m -XX:MaxPermSize=256m'
tomcat_app_server.xml
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="3000" minSpareThreads="500" maxIdleTime="60000"/><Connector executor="tomcatThreadPool" port="8091" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
keepAliveTimeout="15000"
maxKeepAliveRequests="1"
acceptCount="1000"
enableLookups="false"
redirectPort="8443" URIEncoding="UTF-8" /><Host name="mall-sc.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-cookie-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-cookie-web" path="/" reloadable="true"/>
</Host>
<Host name="mall-my.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-member-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-member-web" path="" reloadable="true"/>
</Host>
<Host name="mall-info.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-info-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-info-web" path="" reloadable="true"/>
</Host>
<Host name="mall-open.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-open-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-open-web" path="" reloadable="true"/>
</Host>
<Host name="mall-pay.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-pay-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-pay-web" path="" reloadable="true"/>
</Host>
<Host name="mall-cms.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-cms-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-cms-web" path="" reloadable="true"/>
</Host>
<Host name="mall-common.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-common-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-common-web" path="" reloadable="true"/>
</Host>
<Host name="mall-cs.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-community-service-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-community-service-web" path="" reloadable="true"/>
</Host>
<Host name="mall-c.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-cookie-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-cookie-web" path="" reloadable="true"/>
</Host>
<Host name="mall-search.messandbox.com" appBase="/data/tomcat-m-web/webapps/cm-search-web" unpackWARS="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/data/tomcat-m-web/webapps/cm-search-web" path="" reloadable="true"/>
</Host>
tomcat_web_server.xml
JAVA_OPTS='-server -Xms512m -Xmx1536m -Xss512k -XX:MaxNewSize=512m -XX:MaxPermSize=512m -Djava.awt.headless=true'<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="3000" minSpareThreads="500"/> <Connector executor="tomcatThreadPool" port="7891" protocol="org.apache.coyote.http11.Http11NioProtocol" connectionTimeout="20000" maxThreads="3000" minSpareThreads="200" maxSpareThreads="5000" acceptCount="5000" enableLookups="false" redirectPort="8443" URIEncoding="UTF-8"/> <Context docBase="/data/tomcat-m-app/webapps/cm-cms-app" path="/cm-cms-app" debug="0" reloadable="true" /> <Context docBase="/data/tomcat-m-app/webapps/cm-common-app" path="/cm-common-app" debug="0" reloadable="true" /> <Context docBase="/data/tomcat-m-app/webapps/cm-community-service-app" path="/cm-sommunity-service-app" debug="0" reloadable="true" /> <Context docBase="/data/tomcat-m-app/webapps/cm-info-app" path="/cm-info-app" debug="0" reloadable="true" /> <Context docBase="/data/tomcat-m-app/webapps/cm-member-app" path="/cm-member-app" debug="0" reloadable="true" /> <Context docBase="/data/tomcat-m-app/webapps/cm-open-app" path="/cm-open-app" debug="0" reloadable="true" /> <Context docBase="/data/tomcat-m-app/webapps/cm-pay-app" path="/cm-pay-app" debug="0" reloadable="true" /> <Context docBase="/data/tomcat-m-app/webapps/cm-search-app" path="/cm-search-app" debug="0" reloadable="true" />
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于