From 6a143be8295f4e274bf9bd10101e9866a72e046e Mon Sep 17 00:00:00 2001 From: Matthew Evan Date: Sat, 3 Jul 2021 10:55:06 -0400 Subject: Updated nextcloud.html --- nextcloud.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nextcloud.html b/nextcloud.html index 259c361..b412650 100644 --- a/nextcloud.html +++ b/nextcloud.html @@ -90,8 +90,6 @@ server { gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; - pagespeed off; - add_header Referrer-Policy "no-referrer" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Download-Options "noopen" always; @@ -126,7 +124,11 @@ server { fastcgi_param modHeadersAvailable true; fastcgi_param front_controller_active true; - fastcgi_pass php-handler; + + # 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_intercept_errors on; fastcgi_request_buffering off; -- cgit v1.2.3 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