Skip to content

Instantly share code, notes, and snippets.

@eyakcn eyakcn/nginx.conf
Created Feb 19, 2016

Embed
What would you like to do?
location {
if ($http_x_real_ip != ''){
set $clientip $http_x_real_ip;
break;
}
if ($http_x_real_ip = ''){
set $clientip $remote_addr;
break;
}
proxy_set_header X-Real-IP $clientip;
}
location ^~ /api/stomp {
proxy_pass http://tomcat:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.