Not quite answering my own question, the following:
void setup()
{
Serial.begin(9600);
pinMode(10, OUTPUT);
digitalWrite(10,LOW);
Ethernet.begin(mac, ip);
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
digitalWrite(10,HIGH);
if (!SD.begin(4))
Serial.println("SD initialization failed.");
digitalWrite(10,LOW);
Serial.print("server is (still?) at ");
Serial.println(Ethernet.localIP());
}
Seems to work most reliably. Which is to say, set pin 10 LOW when talking to the ethernet, and HIGH when initialising the SD (it seems it can be left LOW when opening and reading SD files which in my case contain some HTML that's being served up; I haven't tried writing to the SD). Any other pattern of LOWs and HIGHs mostly stops either the SD or the ethernet or both from working, but you can sometimes leave out the digitalWrite(10,HIGH); before the SD initialisation and things will still work. Setting 10 HIGH before doing anything ethernet always stops the ethernet in its tracks.
I think I am confused (not for the first time...)