Magnetic flux structure on the surface of EuFe2(As1-xPx)2 single crystals with nearly optimal phosphorus doping levels x = 0.20 and x = 0.21 is studied by low-temperature magnetic force microscopy and decoration with ferromagnetic nanoparticles. The studies are performed in a broad temperature range. It is shown that the single crystal with x = 0.21 in the temperature range between the critical temperatures TSC= 22 K and TC = (18 ± 0.3) K of the superconducting and ferromagnetic phase transitions, respectively, has the vortex structure of a frozen magnetic flux, typical for type-II superconductors. The magnetic domain structure is observed in the superconducting state below TC. The nature of this structure is discussed.