# Guix - PHP Problems -rw-r--r-- 1.5 KiB View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Related services in config.scm

(service php-fpm-service-type)
(service nginx-service-type
         (nginx-configuration
           (server-blocks
             (list (nginx-server-configuration
                     (server-name '("<domain>"))
                     (root "/srv/http/<domain>/")
                     (index '("index.html" "index.php"))
                     (locations
                      (list (nginx-php-location)))
                     (ssl-certificate "/etc/letsencrypt/live/<domain>/fullchain.pem")
                     (ssl-certificate-key "/etc/letsencrypt/live/<domain>/privkey.pem")))))))
---------------------------------
The permissions on /srv/http/<domain>/  (cb is my user)

drwxrwx--- 2 nginx nginx 4.0K Jan 18 14:35 ./
drwxrwxr-x 3 root  nginx 4.0K Jan 10 19:53 ../
-rw-r--r-- 1 cb    nginx    6 Jan 10 20:12 index.html
-rw-r--r-- 1 cb    nginx   22 Jan 18 14:34 index.php
-rw-r--r-- 1 cb    nginx    7 Jan 18 14:35 test.php
---------------------------------
/var/log/nginx/access.log

<IP> - - [18/Jan/2021:14:35:10 +0200] "GET /test.php HTTP/1.1" 404 27 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP> Safari/537.36 Edg/<IP>"

------------------------------
/var/log/nginx/error.log

2021/01/18 14:35:10 [error] 3768#0: *1350 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: <IP>, server: <domain>, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7-fpm.sock:", host: "<domain>"