<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="2"><font face="Courier 10 Pitch">Hi guys.<br>
<br>
This must be trivial - I certainly thought - but it confused the
hell out of me:<br>
I'm doing - what many must have done before me - this:<br>
...<br>
root /var/www/ale.xyx_wordpress;<br>
<br>
location / {<br>
try_files $uri $uri/ /index.php?$args;<br>
}<br>
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {<br>
expires max;<br>
log_not_found off;<br>
}<br>
location = /favicon.ico {<br>
log_not_found off;<br>
access_log off;<br>
}<br>
location = /robots.txt {<br>
allow all;<br>
log_not_found off;<br>
access_log off;<br>
}<br>
index index.php index.html index.htm;<br>
<br>
location ~ \.(php|phar)(/.*)?$ {<br>
fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;<br>
<br>
fastcgi_intercept_errors on;<br>
fastcgi_index index.php;<br>
include fastcgi_params;<br>
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;<br>
#fastcgi_param PATH_INFO $fastcgi_path_info;<br>
fastcgi_pass php-fpm;<br>
}<br>
<br>
# upstream<br>
<br>
upstream php-fpm {<br>
server unix:/run/php-fpm/www.sock;<br>
}<br>
<br>
when I go to web root, Nginx logs:<br>
...<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "SERVER_PORT"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
var: "443"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"SERVER_PORT: 443"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "SERVER_NAME"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
var: "ale.xyz"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"SERVER_NAME: ale.xyz"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "REDIRECT_STATUS"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "200"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"REDIRECT_STATUS: 200"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
copy: "SCRIPT_FILENAME"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
var: "/var/www/ale.xyx_wordpress"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 http script
var: "/index.php"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"SCRIPT_FILENAME: /var/www/ale.xyx_wordpress/index.php"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_HOST: ale.xyz"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_CACHE_CONTROL: max-age=0"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_UPGRADE_INSECURE_REQUESTS: 1"<br>
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"<br>
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"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_SEC_GPC: 1"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.9"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_SEC_FETCH_SITE: none"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_SEC_FETCH_MODE: navigate"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_SEC_FETCH_USER: ?1"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_SEC_FETCH_DEST: document"<br>
2023/08/03 13:50:24 [debug] 1112963#1112963: *27 fastcgi param:
"HTTP_ACCEPT_ENCODING: gzip, deflate, br"<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"<br>
...<br>
and eventually:<br>
...<br>
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"<br>
...<br>
<br>
This is pretty much vanilla-default on Centos 9, those configs
are - what am I missing?<br>
I hope it's be trivial for some people here and I could get some
pointers.<br>
many thanks, L.<br>
</font></font>
</body>
</html>