upstream liferay { server 127.0.0.1:8080 fail_timeout=0; } server { listen 80; server_name liferay.boschautoparts.com; return 301 https://$host:443$request_uri; } server { listen 443 ssl; server_name liferay.boschautoparts.com; ignore_invalid_headers off; ssl_password_file /etc/nginx/certs/global.pass; ssl_certificate /etc/httpd/certs/liferay.cer; ssl_certificate_key /etc/httpd/certs/liferay.key; location / { sendfile off; proxy_pass http://liferay; proxy_redirect default; proxy_set_header Host $host:$server_port; 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_max_temp_file_size 0; #this is the maximum upload size client_max_body_size 200m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } }