Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

334
Vistas
Symfony project works only homepage. When I navigate to the other pages Apache returns 404

A have symfony5 project. When I hosted to server I changed the default host path from https://example.com to https://example.com/public, because index.php is in /public folder. From then my site works only on the homepage. When I navigate to the other pages Apache returns 404. "The requested URL /bio/ was not found on this server". Everything works on localhost but not on the host.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You should change the DocumentRoot on Apache to point to the public folder and therefore, the url will point to the public folder without it being present in your url.

Here is an example of a VirtualHost Apache allowing you to listen to the website.loc url and point to the public folder linked to this website (it may not be complete):

<VirtualHost *:80>
    DocumentRoot "/path/to/website/public/" 
    ServerName webiste.loc
    DirectoryIndex index.php

    ErrorLog "/var/log/httpd/error_log"
    CustomLog "/var/log/httpd/access_log" common


    <Directory "/path/to/website/public/">
        AllowOverride none
        Order allow,deny
        Allow from all
        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ index.php [QSA,L]
        </IfModule>
    </Directory>
</VirtualHost>

If it doesn't work, can you give us the configuration of your VirtualHost on Apache? Watch out for sensitive info that may be present.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda