<div dir="ltr">Hi<br><br>I'm using nginx is a proxy for a long polling application.<br>Old browsers have low limits on number of concurrent http requests so I'm using arbitrary subdomains for each vhost.<br><br>Is it possible to set the Host header to be <a href="http://vhost.example.com">vhost.example.com</a> when the url is <a href="http://something.vhost1.example.com">something.vhost1.example.com</a><br>
without knowing from advanced what 'something' and 'vhost1' are?<br><br>I'm currently able to set Host to *.com but I want to strip the first part.<br><br>server {<br> listen 80;<br> server_name *.com;<br>
<br> location /test {<br> proxy_set_header Host $Host;<br> proxy_set_header X-Real-IP $remote_addr;<br> proxy_pass <a href="http://localhost:8000">http://localhost:8000</a>;<br> }<br>}<br>
<br>Thanks<br></div>