Want more timely Centmin Mod News Updates?
Become a Member

How to install ownCloud on Centmin Mod Nginx

How to install ownCloud on Centmin Mod Nginx

Tags:
  1. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    11:55 AM
    1.9.9
    10
    Thank you for your explanation. I followed your links and I don't know which way to enable fileinfo: edit centmin.sh or inc/php_configure.inc ?

    EDIT:
    I've just checked php_configure.inc and don't understand the logic of these codes:
    Code:
    if [ "$PHPSNMP" == 'y' ]; then
      SNMPOPT=" --with-snmp"
    else
      SNMPOPT=""
    fi
    
    if [ "$PHPFINFO" == 'y' ]; then
      SNMPOPT=""
    else
      SNMPOPT=" --disable-fileinfo"
    fi
    
    
    if [[ "$CHECKLOWMEMPHP" = "1" || "$PHPFINFO" = 'n' ]]; then
      FILEINFOOPT=" --disable-fileinfo"
    else
      FILEINFOOPT=""
    fi
    Then I checked php -i and found that "--with-snmp" is not added while compiling PHP even when PHPSNMP = y in centmin.sh.
     
    Last edited: Oct 15, 2014
  2. eva2000

    eva2000 Administrator Staff Member

    44,804
    10,216
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,834
    Local Time:
    2:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    just edit centmin.sh variable for PHPFINFO=y and then run centmin.sh menu option 5 to recompile PHP and only edit PHP-FPM - Enabling PHP Fileinfo extension module | Centmin Mod Community memory if <530000 bytes

    as to snmp haven't really tested it lately so you'd have to check the php_upgrade logs in /root/centminlogs to see what is going on as per How to troubleshoot Centmin Mod initial install issues | Centmin Mod Community use pastebin or gist to share log info

    make sure you're editing the centmin.sh on your server
     
  3. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    11:55 AM
    1.9.9
    10
    I understand what you said about memory below 530000.

    Actually I have not checked what snmp is but I think it's a bug when phpsnmp=y but "--with-snmp" is not added to configure parameter while compiling

     

    Attached Files:

  4. eva2000

    eva2000 Administrator Staff Member

    44,804
    10,216
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,834
    Local Time:
    2:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    haha i messed up variables in lines 67 to 77 of inc/php_configure.inc :LOL: need to fix that as both FILEINFO and SNMP incorrectly used same variable to hold their value :eek:
     
  5. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    11:55 AM
    1.9.9
    10
    Yeah I've just found that too, just need to remove
    Code:
    if [ "$PHPFINFO" == 'y' ]; then
    SNMPOPT=""
    else
    SNMPOPT=" --disable-fileinfo"
    fi
    because it messes up with SNMPOPT. The true variable FILEINFOOPT is checked in the lines below that.

    snmp parameter is added as it should be ;)
     
  6. eva2000

    eva2000 Administrator Staff Member

    44,804
    10,216
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,834
    Local Time:
    2:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  7. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    11:55 AM
    1.9.9
    10
    I want to correct I am having issues with downloading files, although files are uploaded successfully. It's maybe not related to nginx/centminmod but owncloud itself. I will update to this post.

    I've just do a fresh install and when I download a sample file, I get file not found:
    Code:
    https://owncloud1.com/index.php/apps/files/ajax/download.php?dir=/&files=ownCloudUserManual.pdf
    Download folder seems to be working.

    ------------------

    I've just tried installing owncloud 6.0.5 and downloading works fine, although files are downloaded with download.php, not the file name. May be owncloud 7 need different nginx rewrite rules?

    ----------------

    Just tried to edit rewrite rule following this page and download works now.

    -----------

    UPDATE: Found that removing/commenting out
    Code:
    fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
    makes download works because the lines do not work with OC7
    Code:
    location ~ ^/home/nginx/domains/owncloud1.com/public/data/.+$ {
    internal;
    root /;
    }
    
    location ~ ^/tmp/oc-noclean/.+$ {
    internal;
    root /;
    }
    
    location ~ "^/tmp/owncloud-oc[a-zA-Z0-9]{10}/.+$" {
    internal;
    root /;
    }
    They are replaced with
    Code:
    location ^~ /data {
    internal;
    }
    Then download works but all files are downloaded with name "download.php". Turning off X-accel corrects the file name. Searching for the solution.
     
    Last edited: Oct 16, 2014
  8. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    11:55 AM
    1.9.9
    10
    I'd have to say that I have problem with WebDAV with this guide, and I had to use conf file from owncloud 7 home page.

    About the X-Accel-Redirect file name issue, here is the fix:
    In the owncloud7 home page it has this for X-Accel-Redirect:
    Code:
    location ^~ /data {
    internal;
    }
    Edit to this:
    Code:
    location ^~ /data {
    if ($request_filename ~ /([^/]+)$) {
    set $filename $1;
    }
    add_header Content-Disposition 'inline; filename=\"$filename\"';
    internal;
    }
    This will extract filename and add content-disposition with correct name when access file from /data. Some how content-disposition is not transferred while with X-Accel-Redirect
     
  9. eva2000

    eva2000 Administrator Staff Member

    44,804
    10,216
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,834
    Local Time:
    2:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    wow thanks for sharing the work around and solutions for ownCloud 7 compatibility !

    will take me a while to digest them :D
     
  10. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    11:55 AM
    1.9.9
    10
    Hello.
    I've just tried to resolve the problem I said before: files are downloaded with name download.php, not the correct name. After testing several virtual machines, I found that the bug disappear without touching any nginx config files when I turn off nginx pagespeed. Could you test and confirm the problem?
     
  11. eva2000

    eva2000 Administrator Staff Member

    44,804
    10,216
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,834
    Local Time:
    2:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  12. Talia Olga

    Talia Olga Member

    40
    0
    6
    Sep 28, 2014
    Ratings:
    +0
    Local Time:
    9:55 PM
    1.7.5
    5.x.x
    Hi,
    Thanks again
    little help needed
    i just setup a cms with centminmod
    the admin url is
    >>> site.com/admin.php

    my question is
    So, do i need to disable some php functions??
    and, what is the correct REWRITE rule for nginx to redirect to the ADMIN page which is listed above
    when i enter site.com/admin.php
    it's showing 404 ERROR
    Oh the post url is

    site.com/en/movie/245891/John+Wick-2014

    When I browse i found 404 error

    can you please give me the rewrite rules for the admin page and the post pages too!!
     
    Last edited: Nov 7, 2014
  13. eva2000

    eva2000 Administrator Staff Member

    44,804
    10,216
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,834
    Local Time:
    2:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    AFAIK, no need to disable any php functions but as I said in previous post above, not familiar with ownCloud to know specifics so rewrite rule you're on your own. IIRC, my admin page worked fine when I did use ownCloud 6 following the above guide