Welcome! Log In Create A New Profile

Advanced

wordpress - Primary script unknown

lejeczek via nginx
August 03, 2023 08:02AM
Hi guys.

This must be trivial - I certainly thought - but it confused
the hell out of me:
I'm doing - what many must have done before me - this:
....
  root         /var/www/ale..xyx_wordpress;

  location / {
    try_files $uri $uri/ /index.php?$args;
  }
  location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires max;
    log_not_found off;
  }
  location = /favicon.ico {
    log_not_found off;
    access_log off;
  }
  location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
  }
  index index.php index.html index.htm;

  location ~ \.(php|phar)(/.*)?$ {
    fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;

    fastcgi_intercept_errors on;
    fastcgi_index  index.php;
    include        fastcgi_params;
    fastcgi_param  SCRIPT_FILENAME
$document_root$fastcgi_script_name;
    #fastcgi_param  PATH_INFO $fastcgi_path_info;
    fastcgi_pass   php-fpm;
  }

# upstream

upstream php-fpm {
        server unix:/run/php-fpm/www.sock;
}

when I go to web root, Nginx logs:
....
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "SERVER_PORT"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
var: "443"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "SERVER_PORT: 443"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "SERVER_NAME"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
var: "ale.xyz"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "SERVER_NAME: ale.xyz"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "REDIRECT_STATUS"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "200"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "REDIRECT_STATUS: 200"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "SCRIPT_FILENAME"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
var: "/var/www/ale.xyx_wordpress"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
var: "/index.php"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "SCRIPT_FILENAME: /var/www/ale.xyx_wordpress/index.php"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_HOST: ale.xyz"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_CACHE_CONTROL: max-age=0"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_UPGRADE_INSECURE_REQUESTS: 1"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_USER_AGENT: Mozilla/5.0 (X11; Linux x86_64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0
Safari/537.36"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_ACCEPT:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_SEC_GPC: 1"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.9"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_SEC_FETCH_SITE: none"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_SEC_FETCH_MODE: navigate"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_SEC_FETCH_USER: ?1"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_SEC_FETCH_DEST: document"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_ACCEPT_ENCODING: gzip, deflate, br"
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi
param: "HTTP_COOKIE:
wordpress_test_cookie=WP%20Cookie%20check;
wp-settings-time-1=1686766849;
PHPSESSID=caa771c30b66d7bf6c86ab15b132479f"
....
and eventually:
....
2023/08/03 13:50:24 [error] 1112963#1112963: *27 FastCGI
sent in stderr: "Primary script unknown" while reading
response header from upstream, client: 10.3.9.144, server:
ale.xyz, request: "GET / HTTP/2.0", upstream:
"fastcgi://unix:/run/php-fpm/www.sock:", host: "ale.xyz"
....

This is pretty much vanilla-default on Centos 9, those
configs are - what am I missing?
I hope it's be trivial for some people here and I could get
some pointers.
many thanks, L._______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

wordpress - Primary script unknown

lejeczek via nginx August 03, 2023 08:02AM

Re: wordpress - Primary script unknown

Francis Daly August 05, 2023 02:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 214
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready