I suggest you use two layers of 5 cm thick and 1 m long concrete slabs without reinforcement steel, they are very cheap available.
But first build a sturdy base of a course sand layer of about .3 wide and 2 m. deep. The course sand will drain the rain water.
Do not use concrete or cement between the slabs, they are heavy and will stick very well together by their friction by weight. Any cement prevents later easy corrections.
Also do not mix cement (powder) or alike in de sand that forms the bottom layer, since that prohibits any possible local level corrections in the future using a hand shovel tilting and pushing sand under the strips..
When necessary you can fix the rails to the top slabs using drilled 5-6mm holes and 5-6mm plugs while keeping the rail on the slab.
But may be better using my simple and flexible horizontal position keeping system made from thin copper strips.
Each strip has two small rounded strip elements soldered on top of the strip at the position of the inside end of the rail beam.
Both ends of the strip are 90 deg bended over at the end of the slab and pushed down into the soil or between the slab and the bricks..
The strip prevents the horizontal movement of the rails.
See picture below: at the left a loose strip ready for applying under the rails and at the right the strip mounted below the rails with both ends pushed down between the concrete slab and the bricks.
This system has prooven to be working very well when the rails is frequently touched by garden equipment and/or people walking around!

Each