#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include 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;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
gzip_static on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 9;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json;
#gzip_disable "MSIE [1-6]\.";
gzip_vary on;
upstream dface1{
ip_hash;
server 192.168.3.165:80;
server 192.168.3.189:80;
}
upstream dfaceTest{
ip_hash;
server dface.octvision.com:443;
}
server {
listen 8088;
server_name dface.octvision.com;
client_max_body_size 100M;
#charset koi8-r;
#access_log logs/host.access.log main;
# location / {
# proxy_pass http://applz_http;
# proxy_set_header Host dface1.octvision.com;
# proxy_set_header X-Forwarded-For $remote_addr;
# root html;
# index index.html index.htm;
# }
#error_page 404 /404.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$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# 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 dface.octvision.com;
client_max_body_size 100M;
ssl on;
#ssl_certificate D:/SSL_dface/1975131_dface.octvision.com_nginx/1975131_dface.octvision.com.pem;
#ssl_certificate_key D:/SSL_dface/1975131_dface.octvision.com_nginx/1975131_dface.octvision.com.key;
ssl_certificate D:/SSL_dface1/2112135_dface1.octvision.com.pem;
ssl_certificate_key D:/SSL_dface1/2112135_dface1.octvision.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
root D:/octv-swapface/;
location /octv-swapface/swapFace {
expires 7d;
}
location /swapResult {
expires 7d;
}
location /octv-swapface/swapModel {
expires 7d;
}
location /octv-swapface/modelTypeThumb {
expires 7d;
}
location /dfaceTest {
proxy_pass https://dfaceTest;
proxy_set_header Host dface.octvision.com;
proxy_set_header X-Forwarded-For $remote_addr;
root html;
index index.html index.htm;
}
location / {
proxy_pass http://dface1;
proxy_set_header Host dface1.octvision.com;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_redirect http:// $scheme://;
root html;
index index.html index.htm;
}
}
}