If both are set, nginx won't start. More error checking is certainly in order, but this seems like a reasonable start.