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

331
Visualizações
How to proxy Headless Wordpress WPGraphQL Plugin Endpoint with NGINX?

I'm running a headless Wordpress instance and nginx is routing it to /adminon my website. On Wordpress I have the WPGraphql plugin installed and activated. GraphiQL is working and querying everything correctly, but I get a 404 page not found when clicking on the link ( https://example.com/admin/graphql ) . Instead I expect to see something in JSON format, like: {"errors":[{"message":"GraphQL Request must include at least one of those two parameters: \"query\" or \"queryId\"","extensions":{"category":"request"}}],"extensions":{"debug":[]}}

I suspect this has something to do with my routing in nginx but I haven't been able to figure this one out.

This is my nginx configuration for the route where I'm accessing the Wordpress admin.

location /admin {    
   ​add_header X-Frame-Options SAMEORIGIN;    ​add_header Strict-Transport-Security "max- 
   age=31536000";    
   ​add_header X-Content-Type-Options nosniff;    ​
   add_header X-XSS-Protection "1; mode=block";    
   ​alias /home/lmraza98/wordpress/; ​
   try_files $uri $uri/ /index.php?$args;    ​
   include  /etc/nginx/mime.types;

   ​location ~ \.php$ {
      ​include snippets/fastcgi-php.conf;
      ​fastcgi_param SCRIPT_FILENAME $request_filename;
      ​fastcgi_pass unix:/run/php/php7.4-fpm.sock;    ​
   }

   ​location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
      ​expires max;
      ​log_not_found off;    
   ​}  
​}

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