Preserve/Keep Request Host Header using Nginx Proxy with Tomcat

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

server {
listen *:81;
server_name s3.bigdatapro.org;
root /usr/local/apache-tomcat-7.0.29/webapps/ROOT/;
location / {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:80/;
}
}

The important bit is proxy_set_header Host $http_host;

 

Leave a Reply

Your email address will not be published. Required fields are marked *