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

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