Owncloud 8 and MySQL: alternative approach

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Hi tekkb,

      just tested it a little bit in my vm.
      It works so far. :thumbsup:

      After installation there is one Error-Message in the log, which is obvisouly meaningless:
      Fatal core Invalid OCS content returned for app user_openmediavault 2015-04-19T10:05:07+00:00


      Second problem is, that my username begins with a capital letter an the log is spammed with:

      Source Code

      1. Error OC_Group_OpenMediaVault Failed to get user 'Arne' (code=6000, message=User 'arne' does not exist) 2015-04-19T10:07:30+00:00

      But authentication works.

      For research reasons I changed the capital 'A' to a lower-case 'a' in
      /etc/openmediavault/config.xml, /etc/passwd
      homedirs name + rights, oc-data-dir
      table owncloud, database export (with 'drop before create'), import batch-file
      That did it so far.
      Did I forget something?
      Is there an easier way to change usernames?

      I think it is a good idea to stay at lowercase usernames. Isn't it?
    • I think, my OC haven't a internet connection. I can't find updates sinze 7.0.2 and download plugins (updates). An other testfolder with OC 8 have the same problem. Everybody ideas?
      omv 4.0.19 | 64 bit | omvextrasorg 4.1.2 | kernel 4.14
      used plugins: nginx | mysql | docker-gui |rsnapshot | antivirus | apt tool | letsEncrypt |
      used other: netxtcloud | logitechmediaserver | emby
    • can everybody tell me what's the problem between the two configs?
      i use an old config:

      Source Code

      1. client_max_body_size 10G; # set max upload size
      2. fastcgi_buffers 64 4K;
      3. rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
      4. rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
      5. rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
      6. index index.php;
      7. error_page 403 /core/templates/403.php;
      8. error_page 404 /core/templates/404.php;
      9. location = /robots.txt {
      10. allow all;
      11. log_not_found off;
      12. access_log off;
      13. }
      14. location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
      15. deny all;
      16. }
      17. location / {
      18. # The following 2 rules are only needed with webfinger
      19. rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
      20. rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
      21. rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
      22. rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
      23. rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
      24. try_files $uri $uri/ index.php;
      25. }
      26. location ~ ^(.+?\.php)(/.*)?$ {
      27. try_files $1 = 404;
      28. include fastcgi_params;
      29. fastcgi_param SCRIPT_FILENAME $document_root$1;
      30. fastcgi_param PATH_INFO $2;
      31. fastcgi_param HTTPS off;
      32. fastcgi_pass $socket;
      33. }
      34. # Optional: set long EXPIRES header on static assets
      35. location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
      36. expires 30d;
      37. # Optional: Don't log access to assets
      38. access_log off;
      39. }
      Display All


      and when i will use the config from a OC7 manuel:

      Source Code

      1. # set max upload size
      2. client_max_body_size 10G;
      3. fastcgi_buffers 64 4K;
      4. # Disable gzip to avoid the removal of the ETag header
      5. gzip off;
      6. # Uncomment if your server is build with the ngx_pagespeed module
      7. # This module is currently not supported.
      8. #pagespeed off;
      9. rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
      10. rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
      11. rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
      12. index index.php;
      13. error_page 403 /core/templates/403.php;
      14. error_page 404 /core/templates/404.php;
      15. location = /robots.txt {
      16. allow all;
      17. log_not_found off;
      18. access_log off;
      19. }
      20. location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
      21. deny all;
      22. }
      23. location / {
      24. # The following 2 rules are only needed with webfinger
      25. rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
      26. rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
      27. rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
      28. rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
      29. rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
      30. try_files $uri $uri/ /index.php;
      31. }
      32. location ~ \.php(?:$|/) {
      33. fastcgi_split_path_info ^(.+\.php)(/.+)$;
      34. include fastcgi_params;
      35. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      36. fastcgi_param PATH_INFO $fastcgi_path_info;
      37. fastcgi_param HTTPS on;
      38. fastcgi_pass php-handler;
      39. }
      40. # Optional: set long EXPIRES header on static assets
      41. location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
      42. expires 30d;
      43. # Optional: Don't log access to assets
      44. access_log off;
      45. }
      Display All

      I have an error when i will safe like thees:

      Source Code

      1. Failed to execute command 'export LANG=C; nginx -t 2>&1': Site configuration file 'openmediavault-nginx' not found.
      2. nginx: [emerg] no port in upstream "php-handler" in /etc/nginx/sites-enabled/openmediavault-nginx:120
      3. nginx: configuration file /etc/nginx/nginx.conf test failed
      4. Fehler #4000:
      5. exception 'OMVException' with message 'Failed to execute command 'export LANG=C; nginx -t 2>&1': Site configuration file 'openmediavault-nginx' not found.
      6. nginx: [emerg] no port in upstream "php-handler" in /etc/nginx/sites-enabled/openmediavault-nginx:120
      7. nginx: configuration file /etc/nginx/nginx.conf test failed' in /usr/share/openmediavault/engined/module/webserver.inc:41
      8. Stack trace:
      9. #0 /usr/share/openmediavault/engined/rpc/config.inc(180): OMVModuleNginxAbstract->applyConfig()
      10. #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      11. #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      12. #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      13. #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      14. #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      15. #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      16. #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      17. #8 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      18. #9 {main}
      Display All


      everybody can tell me the differnt and the problem?
      omv 4.0.19 | 64 bit | omvextrasorg 4.1.2 | kernel 4.14
      used plugins: nginx | mysql | docker-gui |rsnapshot | antivirus | apt tool | letsEncrypt |
      used other: netxtcloud | logitechmediaserver | emby
    • From Post#1:

      Enra wrote:

      Advantage: Easy installation
      Disadvantage: OwnCloud-Users are not synced with OMV-Users. You have to create them manually.


      I installed OC this way since my "xpenology-days".
      So I am not able to give a professional opinion on the OMV-plugin.

      I see, you are still interested in OC. What prevents you from testing these ways in a VirtualBox?
      It is better to make your own experiences and check whether it fits for you!

      The post was edited 1 time, last by Enra ().

    • Enra wrote:

      From Post#1:

      Enra wrote:

      Advantage: Easy installation
      Disadvantage: OwnCloud-Users are not synced with OMV-Users. You have to create them manually.


      I installed OC this way since my "xpenology-days".
      So I am not able to give a professional opinion on the OMV-plugin.

      I see, you are still interested in OC. What prevents you from testing these ways in a VirtualBox?
      It is better to make your own experiences and check whether it fits for you!


      Hallo Enra,

      warum hast Du dich von XPEnology abgewandt?
      Für XPEnology gibt es auch ein OwnCloud Plugin.
      Was war der Hauptgrund?

      Schöne Grüße

      openmedianer
    • Hello,

      I need owncloud. I have used it via the plugin in the past but found it too slow to be usable. Im therefore interested in this method without the plugin.

      As per this thread ownCloud - Best Practice?
      I installed from the plugin and copied the files;
      /etc/nginx/site-enabled/openmediavault-owncloud
      /etc/nginx/openmediavault-webgui.d/owncloud.conf
      /etc/php5/fpm/pool.d/openmediavault-owncloud.conf

      I note that the file;
      /etc/nginx/openmediavault-webgui.d/oc
      was not available, so I couldnt copy it.

      I then removed the plugin and replaced the files to there intended locations.

      I then installed OC8 as per this method, this seemed to go ok except for 1 x message;
      Your data directory and files are probably accessible from the internet because the .htaccess file does not work. . . .

      OK. When I try to access owncloud, it gives me the login prompt and then at directs to the following link;

      Source Code

      1. http://192.168.2.20/owncloud/index.php/apps/files/


      The webpage returns a 500 Internal Server Error.

      Inspection of the nginx error log shows the below, whilst the owncloud-error.log is empty.

      2015/05/02 15:15:37 [error] 20111#0: *669 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 192.168.2.3, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.2.20", referrer: "http://192.168.2.20/owncloud/index.php/settings/admin?trustDomain=localhost"


      Im figuring the issue is an nginx configuration issue but its beyond my capabilities. Ive done a bit of googling, but have yet to unearth anything helpful.

      Does anyone have any ideas that may be useful?

      As an aside - if one is questioning why Im trying to use this method rather than the method in the post using the nginx plugin, the reason is because I need to access owncloud via www.mydomain/owncloud rather than www.mydomain:90 etc. . . . as my work locks down access via ports.

      Any assistance appreciated.
    • Hi,

      before srewing up your system totally, consider a fresh installation as presented.

      Nginx is capable of named-based web-servers, so you can run your owncloud for example under "owncloud.lan".
      If neccesary you have to create a proper DNS entry for "owncloud.lan".
      But be aware that you should prior change the ports omv is listening and create a proper DNS entry for "owncloud.lan".
      Not sure whether they both can listen on 80/443.

      The post was edited 1 time, last by Enra ().

    • Thanks for the advice, you are correct the nginx webserver configuration is too much of a handful for me.

      Im not sure I follow your comments on name based webservers. I want to be able to access from outside my lan, i.e mydomain.com/owncloud. For other applications I have done this using a proxypass in my sites-enabled 'default' file. Perhaps I need to install by your original method and then try to add the proxypass in manually?