worker_processes
2;
worker_rlimit_nofile
50000;
worker_cpu_affinity
00000001 10000000;
events {
worker_connections
50000;
}
http {
include mime.types;
default_
type application/octet-stream;
server_names_
hash_bucket_size
64;
sendfile on;
keepalive_timeout
65;
gzip on;
gzip_min_length
1k;
gzip_buffers
16 64k;
gzip_http_version
1.1;
gzip_comp_level
2;
gzip_types text/plain application/x-javascript text/css text/javascript application/javascript;
gzip_vary on;
gzip_disable “MSIE [
1-
6]\.”;
upstream bakend {
ip_
hash;
server
127.0.
0.1:
9080;
server
127.0.
0.1:
9180;
}
server {
listen
8090;
server_name
127.0.
0.1;
location / {
root html;
index index.html index.htm;
}
error_page
404 500 502 503 504 /
50x.html;
location = /
50x.html {
root html;
}
}
server {
listen
80;
server_name www.****.com ;
location / {
proxy_pass http://
127.0.
0.1:
8090;
proxy_
set_header Host
$host;
proxy_
set_header Remote_Addr
$remote_addr;
proxy_
set_header X-Real-IP
$remote_addr;
proxy_
set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
error_page
404 500 502 503 504 /
50x.html;
location = /
50x.html {
root html;
}
}
server {
listen
80;
server_name lgs.****.com ;
location / {
proxy_pass http://
127.0.
0.1:
9880;
proxy_
set_header Host
$host;
proxy_
set_header Remote_Addr
$remote_addr;
proxy_
set_header X-Real-IP
$remote_addr;
proxy_
set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
error_page
404 500 502 503 504 /
50x.html;
location = /
50x.html {
root html;
}
}
server {
listen
80;
server_name emall.****.com;
location / {
proxy_pass http://bakend/;
proxy_
set_header Host
$host;
proxy_
set_header Remote_Addr
$remote_addr;
proxy_
set_header X-Real-IP
$remote_addr;
proxy_
set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
error_page
404 500 502 503 504 /
50x.html;
location = /
50x.html {
root html;
}
}
server {
listen
80;
server_name managelgs.****.com;
location / {
proxy_pass http://
127.0.
0.1:
9780;
proxy_
set_header Host
$host;
proxy_
set_header Remote_Addr
$remote_addr;
proxy_
set_header X-Real-IP
$remote_addr;
proxy_
set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
error_page
404 500 502 503 504 /
50x.html;
location = /
50x.html {
root html;
}
}
server {
listen
80;
server_name manage.****.com;
location / {
proxy_pass http://
127.0.
0.1:
9280;
proxy_
set_header Host
$host;
proxy_
set_header Remote_Addr
$remote_addr;
proxy_
set_header X-Real-IP
$remote_addr;
proxy_
set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
error_page
404 500 502 503 504 /
50x.html;
location = /
50x.html {
root html;
}
}
server {
listen
80;
server_name images.****.com;
location / {
proxy_pass http://
127.0.
0.1:
1314;
proxy_max_temp_file_size
0;
expires
1h;
}
error_page
404 500 502 503 504 /
50x.html;
location = /
50x.html {
root html;
}
}
}
转载请注明原文地址: https://ju.6miu.com/read-2179.html