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

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