Estoy instalando Nextcloud en un sistema FreeBSD y estoy usando lighttpdun nginxproxy inverso con terminal SSL.

lighttpdes capaz de servir htmlarchivos estáticos y puede servir index.php, pero sin estilos, solo el texto.

Al ejecutar lighttpd -D -f /usr/local/etc/lighttpd/lighttpd.confy acceder, cloud2.myhostname.comhay un montón de errores como se muestra a continuación.

La raíz del documento y todos los descendientes son propiedad www:wwwdel usuario y el grupo bajo el cual se lighttpdestá ejecutando. Todos los directorios tienen permiso de 770. Todos los archivos tienen permiso de 660.

El lighttpdregistro de errores muestra que FastCGI se está ejecutando y FastCGI está devolviendo un seguimiento de error, que se lighttpdregistra como FastCGI-stderr:para indicar que el seguimiento de error proviene de él.

¿Cómo solucionar esto?

server.c.1513) server started (lighttpd/1.4.59)
gw_backend.c.944) gw - found a host  0
gw_backend.c.944) gw - found a host  0
gw_backend.c.228) got proc: pid: 99023 socket: unix:/var/run/lighttpd/sockets/php.socket-2 load: 1
mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"file_put_contents(/usr/local/www/nextcloud/data/.htaccess): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#584","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":"","exception":{"Exception":"Error","Message":"file_put_contents(/usr/local/www/nextcloud/data/.htaccess): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#584","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":584,"function":"file_put_contents"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":222,"function":"protectDataDirectory","class":"OC\\Setup","type":"::"},{"file":"/usr/local/www/nextcloud/core/Controller/SetupController.php","line":57,"function":"getSystemInfo","class":"OC\\Setup","type":"->"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":939,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"file_put_contents(/usr/local/www/nextcloud/data/index.html): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#585","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":"","exception":{"Exception":"Error","Message":"file_put_contents(/usr/local/www/nextcloud/data/index.html): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#585","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":585,"function":"file_put_contents"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":222,"function":"protectDataDirectory","class":"OC\\Setup","type":"::"},{"file":"/usr/local/www/nextcloud/core/Controller/SetupController.php","line":57,"function":"getSystemInfo","class":"OC\\Setup","type":"->"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":939,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":2,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}

mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":2,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}

mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"fopen(/var/log/nextcloud/nextcloud.log): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}

gw_backend.c.303) released proc: pid: 99023 socket: unix:/var/run/lighttpd/sockets/php.socket-2 load: 0
answer

Resulta que en el modules.confde lighttpd, olvidé incluir el archivo conf.d/fastcgi.conf. Solo descomenta la línea.