server {
	listen 80;
	server_name max.geumdo.net gbmax.geumdo.net mobility.geumdo.net;
	root html;
	server_tokens off;
    	fastcgi_hide_header X-Powered-By;
 
    	charset utf-8;
    	location = /favicon.ico { access_log off; log_not_found off; }
    	location = /robots.txt  { access_log off; log_not_found off; }
    	access_log /var/log/nginx/docker-java-access.log combined;
    	error_log  /var/log/nginx/docker-java-error.log error;
    	sendfile on;
 
    	# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
    	proxy_http_version 1.1;
 
    	# Remove the Connection header if the client sends it,
    	# it could be close to close a keepalive connection
    	proxy_set_header Connection "";
 
    	location / {
		proxy_pass http://192.168.0.10:8093;      
        	proxy_set_header        Host                    $http_host;
        	proxy_set_header        X-Real-IP               $remote_addr;
        	proxy_set_header        X-Forwarded-For         $proxy_add_x_forwarded_for;
        	proxy_set_header        X-Forwarded-Proto       $scheme;
                proxy_set_header        X-CSRF-Token            $http_x_csrf_token;  # CSRF 토큰 전달
    		proxy_set_header        Cookie                  $http_cookie;  # 쿠키 전달
 
        	## prevent 504 timeout. default 60s;
        	proxy_connect_timeout       300;
        	proxy_send_timeout          300;
        	proxy_read_timeout          300;
        	send_timeout                300;

		# 클라이언트 요청 버퍼링 끄기
        	proxy_request_buffering off;
        	# 백엔드 서버 응답 버퍼링 끄기
        	proxy_buffering off;
    	}

    	location ~ /\.git {
        	deny all;
    	}
}
