Tôi đang cài đặt Nextcloud trên hệ thống FreeBSD và tôi đang sử dụng lighttpd phía sau một nginx proxy ngược với SSL đầu cuối.
lighttpd có thể phục vụ tĩnh html tập tin và có thể phục vụ index.php, nhưng không có bất kỳ kiểu nào, chỉ có văn bản.
Khi chạy lighttpd -D -f /usr/local/etc/lighttpd/lighttpd.conf và truy cập đám mây2.myhostname.com có một loạt các lỗi như hình dưới đây.
Gốc tài liệu và tất cả con cháu được sở hữu bởi www:www, người dùng và nhóm theo đó lighttpd đang chạy.
Tất cả các thư mục có sự cho phép của 770. Tất cả các tập tin có sự cho phép của 660.
Các lighttpd nhật ký lỗi cho thấy FastCGI đang chạy và FastCGI đang trả về dấu vết lỗi, điều này lighttpd nhật ký như FastCGI-stderr: để chỉ ra rằng dấu vết lỗi là từ nó.
Làm thế nào để giải quyết điều này?
server.c.1513) đã khởi động máy chủ (lighthttpd/1.4.59)
gw_backend.c.944) gw - đã tìm thấy máy chủ 0
gw_backend.c.944) gw - đã tìm thấy máy chủ 0
gw_backend.c.228) có proc: pid: 99023 socket: unix:/var/run/lighthttpd/sockets/php.socket-2 tải: 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): Không thể mở luồng: Quyền bị từ chối tại /usr/local/www/nextcloud/lib/private/Setup.php#584","userAgent":"Mozilla/5.0 ( X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","phiên bản":"","ngoại lệ":{"Ngoại lệ":"Lỗi","Thông báo":"file_put_contents(/usr/local/www /nextcloud/data/.htaccess): Không thể mở luồng: Quyền bị từ chối tại /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/loca l/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":["*** thông số nhạy cảm đã thay thế ***"]},{"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): Không thể mở luồng: Quyền bị từ chối tại /usr/local/www/nextcloud/lib/private/Setup.php#585","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","phiên bản":"","ngoại lệ":{"Ngoại lệ":"Lỗi","Thông báo":"file_put_contents(/usr/local/ www/nextcloud/data/index.html): Không thể mở luồng: Quyền bị từ chối tại /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/lo cal/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":["*** thông số nhạy cảm đã thay thế ***"]},{"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":"không có ứng dụng trong ngữ cảnh","method":"GET","url":"/index.php","message":"Có thể không phát hiện bất kỳ máy chủ nào trong 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":"không có ứng dụng trong ngữ cảnh","method":"GET","url":"/index.php","message":"Có thể không phát hiện bất kỳ máy chủ nào trong 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): Không thể mở luồng: Quyền bị từ chối tại /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) đã phát hành proc: pid: 99023 socket: unix:/var/run/lighthttpd/sockets/php.socket-2 load: 0