worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application
/octet-stream
;
sendfile on;
keepalive_timeout 5;
gzip
on;
upstream mogcluster {
server 172.16.43.3:7001;
server 172.16.43.4:7001;
}
server {
listen 80;
server_name dynamic1.king.com;
access_log
/var/log/nginx/dynamic1
.access.log;
location ~ \.php$ {
root
/nfsshared/html
;
fastcgi_pass 172.16.43.3:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
root
/nfsshared/html
;
index index.php index.html index.htm;
}
}
server {
listen 80;
server_name imgs1.king.com;
access_log
/var/log/nginx/imgs1
.access.log;
location
/images/
{
mogilefs_tracker mogcluster;
mogilefs_domain images;
mogilefs_methods GET PUT DELETE;
mogilefs_pass {
proxy_pass $mogilefs_path;
proxy_hide_header Content-Type;
proxy_buffering off;
}
}
location
/imgs/
{
mogilefs_tracker mogcluster;
mogilefs_domain images;
mogilefs_methods GET PUT DELETE;
mogilefs_pass {
proxy_pass $mogilefs_path;
proxy_hide_header Content-Type;
proxy_buffering off;
}
}
error_page 404
/404
.html;
error_page 500 502 503 504
/50x
.html;
location =
/50x
.html {
root html;
}
}
server {
listen 80;
server_name imgs2.king.com;
access_log
/var/log/nginx/imgs2
.access.log;
location
/images/
{
mogilefs_tracker mogcluster;
mogilefs_domain images;
mogilefs_methods GET PUT DELETE;
mogilefs_pass {
proxy_pass $mogilefs_path;
proxy_hide_header Content-Type;
proxy_buffering off;
}
}
location
/imgs/
{
mogilefs_tracker mogcluster;
mogilefs_domain images;
mogilefs_methods GET PUT DELETE;
mogilefs_pass {
proxy_pass $mogilefs_path;
proxy_hide_header Content-Type;
proxy_buffering off;
}
}
error_page 404
/404
.html;
error_page 500 502 503 504
/50x
.html;
location =
/50x
.html {
root html;
}
}
server {
listen 80;
server_name text1.king.com;
access_log
/var/log/nginx/text1
.access.log;
location ~* ^(/(static|css|js)/.*)$ {
mogilefs_tracker mogcluster;
mogilefs_domain text;
mogilefs_pass $1 {
proxy_pass $mogilefs_path;
proxy_hide_header Content-Type;
proxy_buffering off;
}
}
location / {
index index.html index.htm;
}
error_page 404
/404
.html;
error_page 500 502 503 504
/50x
.html;
location =
/50x
.html {
root html;
}
}
server {
listen 80;
server_name text2.king.com;
access_log
/var/log/nginx/text2
.access.log;
location ~* ^(/(static|css|js)/.*)$ {
mogilefs_tracker mogcluster;
mogilefs_domain text;
mogilefs_pass $1 {
proxy_pass $mogilefs_path;
proxy_hide_header Content-Type;
proxy_buffering off;
}
}
location / {
index index.html index.htm;
}
error_page 404
/404
.html;
error_page 500 502 503 504
/50x
.html;
location =
/50x
.html {
root html;
}
}
}