My situation is this, I have two Docker containers:
- Runs PHP-FPM on port 9000
- Starts nginx and has PHP files (should the PHP-FPM container have access to the files?)
I keep getting the following error:
FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.17.0.1, ser ver: _, request: "GET / HTTP/1.1", upstream: "fastcgi://172.17.0.2:9000", host: "172.17.0.3"
I read here that it is "always related to the wrong set of SCRIPT_FILENAME in the nginx fastcgi_param directive".
The problem is that I do not know how to resolve it: -P
Configuration in container 2:
server { listen 80 default_server; listen [::]:80 default_server; charset UTF-8; root /var/www/WordPress; index index.php index.html index.htm; server_name _; location / { try_files $uri/ /index.php?$args; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index index.php; fastcgi_pass 172.17.0.2:9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /var/www/WordPress$fastcgi_script_name;
source share