set $socket ...... in the /etc/nginx/sites-available/zzz-omv-nginx) is auto generated for you, no need to modify that.
NextCloud Installation Q & A
-
- OMV 3.x
- tinh_x7
-
-
Thanks, Stramm, but like i said, I fixed it by editing my fastcgi_pass $socket; to something else. I am just trying to understand why set $socket "unix:/var/run/fpm-xxxxxxxxxxxx.sock was incorrect on my second attempt at this.
Zitat von tinh_x7set $socket ...... in the /etc/nginx/sites-available/zzz-omv-nginx) is auto generated for you, no need to modify that.
... yeah, and mine was "autogenerated" wrong.
-
I tried to update NC to 13 thru the updater, but after update it still shows 12.0.6, any idea?
-
Maybe delayed deploy? Did you try to switch release channel to 'beta' and back to stable? Worked for me a couple times with earlier upgrades.
-
I had a lot of problems with my NC13 installation after updating to OMV4 but it was my own fault in the end.
I reconfigured a new pool and server but this did not fix my issues as i still got internal server errors.My Problem, i didnt check the nextcloud logs.
I still had the memcache APCu Settings in my config.php
So i disabled this line and it finally started again
After i installed the apcu modul using:
sudo apt-get install php7.0-apcu
I could enable this option again now my nextcloud server is running happily again like before.
Only thing missing is fail2ban -
It didn't work before b/c APCU wasn't install.
-
Hey
I have a problem with NC installation using OMV / Docker. As I am a new Raspberry user, I do everything like in tutorials, and everything is OK. I installed the NC from the terminal according to the advice on the OMV website and I succeeded. At the next RP I wanted to do it with the help of Docer - and the server did not work. After downloading the image and running - error 404. Can anyone tell you how to set Modify Container? Clean installation of the OMV (the newest) system, server running, I added Docer repositories. -
-
OMV version: 3.0.99
Nextcloud version: 13.0.1I am stuck in step 7 of the installation guide. I go to http://<ip>:90 and keep getting 404 error. Error log says "Primary script unknown" while reading response header from upstream.
I followed the exact same steps but did not turn SSL on yet. This is my server extra options:
Code
Alles anzeigenadd_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;"; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; location = /robots.txt { log_not_found off; allow all; access_log off; } # The following 2 rules are only needed for the user_webfinger app. # Uncomment it if you're planning to use this app. #rewrite ^/.well-known/host-meta /public.php?service=host-meta last; #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json # last; location = /.well-known/carddav { return 301 $scheme://$host/remote.php/dav; } location = /.well-known/caldav { return 301 $scheme://$host/remote.php/dav; } # set max upload size client_max_body_size 50G; fastcgi_buffers 64 4K; # Disable gzip to avoid the removal of the ETag header gzip off; # Uncomment if your server is build with the ngx_pagespeed module # This module is currently not supported. #pagespeed off; error_page 403 /core/templates/403.php; error_page 404 /core/templates/404.php; location / { rewrite ^ /index.php$uri; } location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { deny all; } location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { deny all; } location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) { fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS off; #Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; fastcgi_param front_controller_active true; fastcgi_pass $socket; fastcgi_intercept_errors on; } location ~ ^/(?:updater|ocs-provider)(?:$|/) { try_files $uri/ =404; index index.php; } # Adding the cache control header for js and css files # Make sure it is BELOW the PHP block location ~* \.(?:css|js|woff|svg|gif)$ { try_files $uri /index.php$uri$is_args$args; add_header Cache-Control "public, max-age=7200"; add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;"; add_header X-Content-Type-Options nosniff; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; # Optional: Don't log access to assets access_log off; } location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ { try_files $uri /index.php$uri$is_args$args; # Optional: Don't log access to other assets access_log off; }
To debug, I added the following to http block of nginx.conf:
And this to the site's server block:
I then tried to access the site and found this in this log I created:
I am unable to figure out the problem? Please help... -
Can you post your NextCloud's Nginx setup screenshot ?
-
Can you post your NextCloud's Nginx setup screenshot ?
I upgraded OMV from 3 to 4 now and reinstalled mysql and nginx and set up everything again. I am still facing the 404 not found error. Here is the screenshot you requested. Thank you!
Here is also screenshot of permissions inside the nextcloud folder:
-
That's what I'm saying, I cannot even start the installation.
@mrboki, I think I am facing the same problem. Were you able to fix the 404 error?
-
Your 'PHP: Default Config" is turned OFF.
Turn it ON, and try again.
-
Your 'PHP: Default Config" is turned OFF.
Turn it ON, and try again.
Thanks for the reply. Ok I am very confused now. Should I use the php default config like you mentioned or use the pool that we create in earlier step? I dug in more and found out that, for some reason (this bug needs to be investigated), the .conf and .sock file was not created for the pool that we created and hence fastcgi_pass $socket wasn't working like @z-vap had faced. I saved the pool config again, and this time .conf and .sock were created for the pool. So after that, I changed it back to fastcgi_pass $socket and I didn't face 502 Bad Gateway. Now back to my bigger problem, if we're using the pool, we shouldn't use the PHP default config right?
-
no, the PHP pool isn't relate to the Nginx default config.
Default config is for the $socket. -
@mrboki, I think I am facing the same problem. Were you able to fix the 404 error?
Hello, no I did not as I got no response. The problem is that the installation guide is not working.
"2. Un-check the "default config' option in the PHP section. (Credit to @Zocker1996)"
I tried with checked but it's not working either... same 404 error. Did you solve this with .conf and .sock?
-
Hello, no I did not as I got no response. The problem is that the installation guide is not working.
"2. Un-check the "default config' option in the PHP section. (Credit to @Zocker1996)"I tried with checked but it's not working either... same 404 error. Did you solve this with .conf and .sock?
Nope. What I was explaining was the cause behind 502 Bad Gateway error. I tried checked and unchecked too and getting same 404 error. I think I am giving up and going to try with docker. This is too much of a mess.
-
Ensure your Nginx and PHP are running.
Some users have the same issue like yours.
It could be incorrect socket.You can try to turn off the PHP default configure option, and do the followings:
Replace fastcgi_pass $socket with fastcgi_pass /run/php/php7.0-fpm.sock;
service nginx restart
service php7.0-fpm restart -
Ensure your Nginx and PHP are running.
Some users have the same issue like yours.
It could be incorrect socket.You can try to turn off the PHP default configure option, and do the followings:
Replace fastcgi_pass $socket with fastcgi_pass /run/php/php7.0-fpm.sock;
service nginx restart
service php7.0-fpm restartI had luck with this change and could install nextcloud 13 on omv4 successfully. Thanks for your hard work and investigation!
Now I have checked my server against the ssllabs servertest and got - i think - a https-redirection-loop.Do you experience the same with your config or have an idea what the cause could be?
My nginx config:
Code
Alles anzeigenserver { listen 443 ssl; listen [::]:443 ssl; ssl_certificate /etc/ssl/certs/cert.crt; ssl_certificate_key /etc/ssl/private.key; set $root_path "/path/to/root"; root $root_path; index index.php; set $socket "unix:/var/run/fpm-b4f19467-563b-4681-b8e4-582ee046726b.sock"; location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass $socket; } access_log /var/log/nginx/f0abf6c7-9c36-4f12-b323-6f499765a98e-access.log; error_log /var/log/nginx/f0abf6c7-9c36-4f12-b323-6f499765a98e-error.log; large_client_header_buffers 4 8k; # Set HTTP Strict Transport Security (HSTS) to 365 days add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; add_header X-Content-Type-Options nosniff; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; # Use self generated Diffie-Hellman parameter for DHE ciphersuites ssl_dhparam /etc/ssl/dhparams4096.pem; # Session resumption ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_session_tickets off; # OCSP stapling ssl_stapling on; ssl_stapling_verify on; resolver 8.8.8.8 8.8.4.4; ssl_trusted_certificate /etc/letsencrypt/live/domain.xxx/chain.pem; # modern cipher configuration ssl_protocols TLSv1.2; ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACH$ ssl_prefer_server_ciphers on; location = /robots.txt { log_not_found off; allow all; access_log off; } # The following 2 rules are only needed for the user_webfinger app. # Uncomment it if you're planning to use this app. #rewrite ^/.well-known/host-meta /public.php?service=host-meta last; #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json # last; location = /.well-known/carddav { return 301 $scheme://$host/remote.php/dav; } location = /.well-known/caldav { return 301 $scheme://$host/remote.php/dav; } # set max upload size client_max_body_size 50G; fastcgi_buffers 64 4K; # Disable gzip to avoid the removal of the ETag header gzip off; # Uncomment if your server is build with the ngx_pagespeed module # This module is currently not supported. #pagespeed off; error_page 403 /core/templates/403.php; error_page 404 /core/templates/404.php; location / { rewrite ^ /index.php$uri; } location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { deny all; } location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { deny all; } location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates$ fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS on; #Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; fastcgi_param front_controller_active true; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_intercept_errors on; } location ~ ^/(?:updater|ocs-provider)(?:$|/) { try_files $uri/ =404; index index.php; } # Adding the cache control header for js and css files # Make sure it is BELOW the PHP block location ~* \.(?:css|js|woff|svg|gif)$ { try_files $uri /index.php$uri$is_args$args; add_header Cache-Control "public, max-age=7200"; add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;"; add_header X-Content-Type-Options nosniff; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; # Optional: Don't log access to assets access_log off; } location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ { try_files $uri /index.php$uri$is_args$args; # Optional: Don't log access to other assets access_log off; } }
-
Thanks for the reply. Ok I am very confused now. Should I use the php default config like you mentioned or use the pool that we create in earlier step? I dug in more and found out that, for some reason (this bug needs to be investigated), the .conf and .sock file was not created for the pool that we created and hence fastcgi_pass $socket wasn't working like @z-vap had faced. I saved the pool config again, and this time .conf and .sock were created for the pool. So after that, I changed it back to fastcgi_pass $socket and I didn't face 502 Bad Gateway. Now back to my bigger problem, if we're using the pool, we shouldn't use the PHP default config right?
This is an interesting observation. I will need to save this for the future.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!