To get the best rigidity you need to keep the spindle inline with the support bearings so no overhang. You could rotate the rails so they are mounted end on and in the middle of the beam.

The vertical moving gantry beam looks a bit slender with regards to the end bearing spacing. I would guess its 200mm deep and 1000mm wide? Thats is not a good ratio for racking and I would make the most of the gantry height and increase the bearings to maximum so the moving beam is like 'H' shape.

That would naturally reduce the racking and take the pressure off the screws and rams.

Just how I would do it anyway :0)