  Considering both the power Maxwell invariant source and the
Einstein--Gauss--Bonnet gravity, we present a new class of static solutions
yields a spacetime with a longitudinal nonlinear magnetic field. These
horizonless solutions have no curvature singularity, but have a conic geometry
with a deficit angle $\delta \phi$. In order to have vanishing electromagnetic
field at spatial infinity, we restrict the nonlinearity parameter to $s>1/2$.
Investigation of the energy conditions show that these solutions satisfy the
null, weak and strong energy conditions simultaneously, for $s>1/2$, and the
dominant energy condition is satisfied when $s \in ({1/2,1}]$. In addition, we
look for about the effect of nonlinearity parameter on the energy density and
also deficit angle, and find that these quantities are sensitive with respect
to variation of nonlinearity parameter. We find that for special values of
nonlinearity parameter, two important subclass of solutions, so-called
conformally invariant Maxwell and BTZ-like solutions, with interesting
properties, emerge. Then, we generalize the static solutions to the case of
spinning magnetic solutions and find that, when one or more rotation parameters
are nonzero, the brane has a net electric charge which is proportional to the
magnitude of the rotation parameters. We also use the counterterm method to
compute the conserved quantities of these spacetimes such as mass, angular
momentum, and find that these conserved quantities do not depend on the
nonlinearity parameter.
