From d3ac0351075a9febcc0c3a64ae8822f0e3907e5c Mon Sep 17 00:00:00 2001 From: Matthew Evan Date: Sat, 3 Jul 2021 11:06:46 -0400 Subject: Updated nextcloud.htmk --- nextcloud.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nextcloud.html b/nextcloud.html index b412650..a190c3b 100644 --- a/nextcloud.html +++ b/nextcloud.html @@ -42,7 +42,12 @@ EXIT;

Check for the www-data user by running id -u www-data. If a number is output from that command, then the www-data user exists. If not. add the user simply by running useradd www-data

Next, we need to ensure that we have SSL certificates generated for your website. If you have not already done this, refer to this guide. Although having SSL for your site is not required, it is highly recommended that you have it or you will risk attackers being able to steal passwords and data.

In /etc/nginx/sites-available/ we need to make a new configuration for Nextcloud (example: /etc/nginx/sites-available/nextcloud). Create it and open it, modify, and add the following lines:

-
server {
+        
upstream php-handler {
+    server unix:/var/run/php/php7.4-fpm.sock;
+    server 127.0.0.1:9000;
+}
+
+server {
     listen 80;
     listen [::]:80;
     server_name yourwebsite.com;
@@ -124,11 +129,7 @@ server {
 
             fastcgi_param modHeadersAvailable true;
             fastcgi_param front_controller_active true;
-            
-            # PHP-FPM with Unix socket (seems to work better)
-            fastcgi_pass unix:/run/php/php7.4-fpm.sock;
-            # PHP-FPM with Local server
-            #fastcgi_pass 127.0.0.1:9000
+            fastcgi_pass php-handler;
 
             fastcgi_intercept_errors on;
             fastcgi_request_buffering off;
-- 
cgit v1.2.3