In the developing Drosophila visual system, glia migrate into stereotyped positions within the photoreceptor axon target fields and provide positional information for photoreceptor axon guidance. Glial migration conversely depends on photoreceptor axons, as glia precursors stall in their progenitor zones when retinal innervation is eliminated. Our results support the view that this requirement for retinal innervation reflects a role of photoreceptor axons in the establishment of an axonal scaffold that guides glial cell migration. Optic lobe cortical axons extend from dorsal and ventral positions towards incoming photoreceptor axons and establish at least four separate pathways that direct glia to proper destinations in the optic lobe neuropiles. Photoreceptor axons induce the outgrowth of these scaffold axons. Most glia do not migrate when the scaffold axons are missing. Moreover, glia follow the aberrant pathways of scaffold axons that project aberrantly, as occurs in the mutant dachsous. The local absence of glia is accompanied by extensive apoptosis of optic lobe cortical neurons. These observations reveal a mechanism for coordinating photoreceptor axon arrival in the brain with the distribution of glia to multiple target destinations, where they are required for axon guidance and neuronal survival.