In a turbofan what holds the spinning axis?
Stationary frames
The supporting structures of a turbofan are two stationary frames with their characteristic struts, located at the ends of the engine core: One is behind the OGV stator of the fan module, the other at the aft end of the turbine module:

CFM56 with the two frames visible (source)
Stationary frames to spinning shafts
In the case of an engine with two spools, the frames support the longest shaft (N1, low pressure), which in turn supports the coaxial N2 shaft (high pressure).

Shafts are centered within frames by bearings (drawn in magenta in the next picture).
Shaft to rotors
Disks of rotors on a spool are bolted together to form a continuous structure fixed to the related shaft. The structure is used as the inner wall for the related air duct:

Frames, shafts, bearings. Adapted from CFM56-7B Familiarization Manual
A view of the N1 shaft and the two frames, before adding the bearings and their oil sumps. The fan shaft (darker / trumpet-shaped) is fixed to the N1 shaft using grooves and can be considered part of the N1 shaft:

LP shaft, fan frame and turbine frame of a CFM56-7B
The bearings and the oil sumps are added to center the N1 shaft (blue tubes are used to pressurize air-oil seals of the fan sump). The clevises used to hang the engine under the pylon strut are (barely) visible on the top of the rear frame (see this question for details):

LP shaft, fan frame, turbine frame, bearings and sumps of a CFM56-7B
Another CG view which additional elements:

The fan disk bolted on the N1 shaft (actually fan shaft).

The fan cone and spinner bolted on the fan disk.

The two extremities of the N2 shaft coaxial to the N1 shaft.



Shafts of the CFM56-7B
The HP/N2 shaft (shown in red above) is centered on the LP/N1 shaft by bearings. All rotors of the HP spool form a single structure bolted to the HP shaft (shown in light blue below):


HP rotors of CFM56-7B. Adapted from CFM56-7B Familiarization Manual
Frames to core stators
Similarly, outer shrouds of stators and intermediate rings of a spool are bolted together to form continuous structures.
Four stationary structures are built:

The LP compressor (booster) stators assembly is fixed to the mid-box of the fan frame (on the fan side).
The HP compressor stators assembly is fixed to the mid-box of the fan frame (on the other side).
The combustion chamber is fixed to the HP compressor assembly.
The turbine stators assembly is fixed to the combustion chamber on one end and to the rear frame on the other end.

Overall CG view with some components highlighted:

CFM56-7B cutaway. Original CG model by vhfine3d, at DeviantArt
From frames to wing strut
The engine is supported by a pylon, which is supported by the wing. There are only two mount points connected to the pylon, located on the fan and rear frames. Thrust is usually transferred to the wing using the forward mount point.
If it is not practical to transmit the thrust from the forward mount, e.g. because space is lacking to build a strong mount, then thrust links are used to transfer thrust to the aft mount which transmits it to the pylon:

Sources: left, right
Other components
There are a few other components to support.

The air inlet is fixed on the fan case.

The fan case (which role is to create a duct for the fan and contain any broken fan blade piece) is fixed on the fan frame.

The nacelle, that is the fan cowls and the thrust reversers ducts, including the reversers, is fixed directly to the pylon. The nacelle is not really part of the engine.

The exhaust nozzle and cone are fixed to the turbine frame.


To sum up
Engine component are kept together using two frames.

Rotors are fixed to shafts, which are maintained within the frames by bearings.
Stationary components (fan case, stators, combustion chamber, etc) are bolted together and fixed the directly to the frames.