0

Goal: install dokuwiki on my raspi 3

Method: Using This tutorial to install

Problem: I'm getting a 502 error from nginx when I try to run the install script.

Configuration: eth0 is set to a static IP, 192.168.1.81

My config file in /etc/nginx/sites-enabled is

server {
    listen               80;
    server_name          labwiki;

    root /var/www/dokuwiki-2018-04-22a;

    location / {
        index doku.php;
        try_files $uri $uri/ @dokuwiki;
    }

    location @dokuwiki {
        rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
        rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
        rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
        rewrite ^/(.*) /doku.php?id=$1&$args last;
    }

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

    location ~ /(data|conf|bin|inc)/ {
        deny all;
    }

}

My error message:

2019/10/12 07:28:48 [crit] 9189#9189: *1 
connect() to unix:/run/php/php7.0-fpm.sock 
failed (2: No such file or directory) while 
connecting to upstream, client: 
192.168.1.81, server: labwiki, request: 
"GET /install.php HTTP/1.1", upstream: 
"fastcgi://unix:/run/php/php7.0-fpm.sock:", 
host: "labwiki"

How can I fix this?

  • Have you installed fcgiwrap? (Or any other CGI wrapper?) – Dougie Oct 12 '19 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.