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

209
Vistas
Deploying Vue application, can't access API

I have a Mint VM that contains a Vue application and an API (with 2 databases, one MySQL and one MongoDB). I'm trying to make the application accessible from outside of my network by using Apache. I have also forwarded the 80 port on my router, to my Mint VM. So anyone who accesses 109.XXX.XXX.XXX (router IP) will be redirected to the Vue application.

I have used npm run build, and copied the content of the dist folder into /var/www/MyProject.com/public_html. My /etc/apache2/site-availables/000-default.conf file looks like this :

<VirtualHost *:80>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    DocumentRoot "/var/www/MyProject.com/public_html"
    <Directory "/var/www/MyProject.com/public_html">
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
    </Directory>
</VirtualHost>
  • From my VM, if I access to 109.XXX.XXX.XXX, the API is working and i can log into the Vue application.
  • From any other computer, if I access to 109.XXX.XXX.XXX, the API isn't working, and the console gives me back a POST http://localhost:3000/users/login/ net::ERR_CONNECTION_REFUSED error when i try to log in.

Maybe it has something to do with my requests in the Vue application that still uses localhost ?

over 4 years ago · Santiago Trujillo
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