Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

512
Views
¿Cómo configurar Vue.js y una aplicación html simple con nginx?

Tengo una aplicación Vue.js y una API REST que estoy alojando con nginx. En / URL raíz solo hay una página index.html simple. /api/ tiene un servidor REST y /app tiene la aplicación vue.js

Mis configuraciones son..

 server { listen 80; listen 443 ssl; server_name _; root /usr/share/backend; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; location / { index index.html; } location /api/ { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host; proxy_pass http://localhost:8080/; } location /app { alias /usr/lib/App/; try_files /index.html /friendly_404; } location /friendly_404 { return 404 "Sorry, that file could not be found."; } error_log /var/log/nginx/vue-app-error.log; access_log /var/log/nginx/vue-app-access.log; }

Mi servidor /api/ funciona sin ningún problema, pero vue.js /app no funciona y en mi navegador me da varios errores como este a continuación.

OBTENGA http://192.168.0.1/js/chunk-d9925106.16c4e8be.js net::ERR_ABORTED 404 (No encontrado)

La configuración de Vue.js es...

 module.exports = { // ...other vue-cli plugin options... publicPath: '/app/', configureWebpack: { plugins: [ ] }, productionSourceMap: false, }

¿Qué estoy haciendo mal aquí?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!