  server {
         listen 8090;
        server_name book.keyersoft.com;
        index index.php index.html index.htm default.php default.htm default.html;
         root /www/wwwroot/book.keyersoft.com;

	
location ^~ /
{
    proxy_pass http://localhost:9090/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_http_version 1.1;
    # proxy_hide_header Upgrade;

    add_header X-Cache $upstream_cache_status;

    #Set Nginx Cache
    
    
    set $static_fileH3589PrM 0;
    if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
    {
    	set $static_fileH3589PrM 1;
    	expires 1m;
        }
    if ( $static_fileH3589PrM = 0 )
    {
    add_header Cache-Control no-cache;
    }
}


location ^~ /fileview
{
    proxy_pass http://localhost:8012;
    set $x_base_url $scheme://$Host:$server_port/fileview;
    if ( $Host ~ "(.+)\.keyersoft\.com$" ) {
      set $x_base_url https://$Host/fileview;
    }
    proxy_set_header X-Base-Url $x_base_url;
}


   }
