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

238
Vistas
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
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