ssl redirect issue
Adam Tistler
atistler at gmail.com
Thu Sep 22 09:17:18 UTC 2011
Hi,
I have an ssl nginx setup which was working fine with one server { ssl on }. However I have legacy ssl server_names that I would like to have a 'catch all' for that should be redirected back to the 'main' ssl server name. Config is pasted here.
http://pastebin.com/dXU7BHaB ( I removed some sections for brevity )
When the following lines are enabled:
server {
listen 443 default;
server_name _;
rewrite ^(.*) https://my.example.net$1 permanent;
}
I will get:
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
If i comment those lines out, the request will go thru just fine. However since:
server {
listen 443;
server_name my.example.net;
is treated as the default vhost, even ssl requests for myold.example.net are serviced by this server {} and are not redirected to https://my.example.net (obviously not what I want).
Thanks for the help in advanced.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20110922/60b929a4/attachment-0001.html>
More information about the nginx
mailing list