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

205
Visualizações
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 à 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