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

520
Vistas
No se pueden cargar archivos desde la aplicación angular implementada en el servidor Apache

Quiero crear una aplicación Angular que se ejecute en el servidor Apache. Localmente, desde npm start , funciona bien, pero desde la implementación remota de Apache faltan muchos archivos. Traté de configurar fuentes y archivos i18n en la carpeta src/assets/.... en angular.json :

 "assets": [ "src/favicon.ico", "src/assets", "src/web.config" ],

Pero cuando ejecuto la página web obtengo errores como:

 633328.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) materialdesignicons-webfont14e6.woff2:1 Failed to load resource: the server responded with a status of 404 (Not Found) fontawesome-webfont3295.woff2:1 Failed to load resource: the server responded with a status of 404 (Not Found) fontawesome-webfont3295.woff:1 Failed to load resource: the server responded with a status of 404 (Not Found) materialdesignicons-webfont14e6.woff:1 Failed to load resource: the server responded with a status of 404 (Not Found) fontawesome-webfont3295.ttf:1 Failed to load resource: the server responded with a status of 404 (Not Found) materialdesignicons-webfont14e6.ttf:

1 Error al cargar el recurso: el servidor respondió con un estado de 404 (No encontrado)

Entonces, después de la investigación, parece que tengo que agregar mapeo usando esto: https://www.thewebflash.com/set-the-correct-mime-types-for-woff-fonts-in-your-web-server/ pero no es trabajando. También traté de agregar esta configuración:https://gist.github.com/vmilev/cf8ef05c2d77fc8aedd6c5831d724a77

Pero de nuevo sin suerte. ¿Puedes darme alguna idea de cómo se puede arreglar esto?

archivo .htaccess

 RewriteEngine On # If an existing asset or directory is requested go to it as it is RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d RewriteRule ^ - [L] # If the requested resource doesn't exist, use index.html RewriteRule ^ /index.html <IfModule mod_rewrite.c> Options Indexes FollowSymLinks RewriteEngine On RewriteBase /angular/ RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.html [L] </IfModule> AddType font/woff .woff AddType font/woff2 .woff2
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

simplemente agregue una barra en estilos.css antes de las direcciones URL. Cambiar de esto

 angular/assets/fonts/glyphicons-halflings-regular.eot

a esto

 /angular/assets/fonts/glyphicons-halflings-regular.eot
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