The axis of a solenoid is its geometrical axis.
As a first approximation, the magnetic field in the region of space "inside" a solenoid is uniform, and equal to
$\mathbf{B} = \mu \dfrac{N}{L} i \, \mathbf{\hat{z}}$,
being:
- $\mu$ the magnetic permeability of the medium "inside" the solenoid,
- $\frac{N}{L} = \dfrac{\text{n. windings of the
solenoid}}{\text{length of the solenoid}}$ the density of windings
per unit length,
- and $i$ the electric current in the wire.
With the same current, if you put a ferromagnetic medium inside the solenoid, the magnitude of the magnetic field increases, since $\mu = \mu_r \mu_0 \gg \mu_0$, with $\mu_0$ the permeability of vacuum as a good approximation of permeability of air, and with relative permeability of order $\mu_r = 10^2 \div 10^5$ for ferromagnetic materials,
$B^{ferro} = \mu_r\mu_0 \dfrac{N}{L} i = \mu_r B^{air} = ( 10^2 \div 10^5 ) \cdot B^{air}$.