Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

522
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda