我想做类似的事情:
server_name ~^(www\.)?(?<subdomain>[^.]+).example.org$;
location / {
proxy_pass "http://example.org:8080/$subdomain";
}
Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 10.04LTS 上运行带有 SSL 的 nginx。当我检查证书时,Chrome 给了我这个烦人的警告:
The connection is not compressed.
Run Code Online (Sandbox Code Playgroud)
在响应中,它看起来像是以 gzip 格式发送的:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html; charset=utf-8
Date:Sun, 12 Feb 2012 09:00:38 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:nginx/1.0.5
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Powered-By:PHP/5.3.6-13ubuntu3.3`
Run Code Online (Sandbox Code Playgroud)