No matter what I set "Host" to in HTTP Header Manager, JMeter completely ignores the setting and instead sends the "Server Name or IP" setting from the HTTP Request settings. This is easily repeatable and a real drag since there's no way for me to test virtual hosts if I can't modify the Host header. OS is Ubuntu 9.10 with the stock jmeter 2.3.4 packages installed.
The same in JMeter 2.4. I need this too to test my virtual hosts.
This is not strictly a JMeter problem; you can add a "Host" entry to the Header Manager and it will be passed to the HTTP implementation. However, both the Java and Commons HttpClient 3.1 implementations ignore the header, and generate their own Host headers from the request. It's possible to pass a virtual hostname to HC 3.1 (and with HttpClient 4.x which will be supported in the next release of JMeter), but does not appear to be possible to use virtual hosts with the Java HTTP implementation.
Fixed for HttpClient 3.1 and HttpComponents HttpClient 4.x. Not possible to fix this for the Java HTTP implementation. URL: http://svn.apache.org/viewvc?rev=1104485&view=rev Log: Bug 50516 - "Host" header in HTTP Header Manager is not included in generated HTTP request Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jakarta/jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2446