
user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log debug;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/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  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

   #keepalive_timeout  65;
   keepalive_timeout  0;
   # proxy_read_timeout 300;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;

 server {
        listen       6401 ssl;
        server_name  168.189.9.09;
        ssl_certificate /reuters/certs/certificate.crt;
        ssl_certificate_key /reuters/certs/privateKey.key;
        ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers         HIGH:!aNULL:!MD5;

        #charset koi8-r;
	#charset UTF-8;

        #access_log  /var/log/nginx/host.access.log  main;

        location / {
		proxy_buffering off;
		#keepalive_timeout  0;
		#proxy_set_header Host 168.189.9.09;
		#proxy_set_header X-Real-IP $remote_addr;
		#proxy_set_header X-Forwarded-Host $host;
    		#proxy_set_header X-Forwarded-Server $host;
    		#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		#proxy_set_header Connection open;
		#add_header Access-Control-Allow-Origin *;
                proxy_pass http://168.189.9.09:6400;
            #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;
        }

        }



 server {
        listen       443 ssl;
        server_name  168.189.9.09;
        ssl_certificate /reuters/certs/certificate.crt;
        ssl_certificate_key /reuters/certs/privateKey.key;
        ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers         HIGH:!aNULL:!MD5;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
                proxy_pass http://168.189.9.09;
            #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;
        }

        }






}
