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

237
Views
VueJs FrontEnd instance with Laravel BackEnd Api wire with Nginx in Centos

so I have the following server blocks for nginx and I am trying to add a domain to it so I can install it live with google authentication. These servers blocks work with the IP but I am trying to get it to work with the domain. Any thoughts of what I am doing wrong?

VueJs FrontEnd Server block

server {
        listen 3001;
        server_name domain.com;//an example
        keepalive_timeout 60;
        index index.html;

        location / {
                root /var/www/html/app/front/dist;

        }
}

Laravel 8 BackEnd Server Block

server {
    listen       8001;
    server_name  domain.com;//example

    index index.php;
    autoindex on;

    root /var/www/html/app/api/public;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

If I make a call at domain.com/api, I get a 404 Not Found

about 4 years ago · Juan Pablo Isaza
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!