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

208
Views
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
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!