Learn about Centmin Mod LEMP Stack today
Become a Member

Jamroom

Discussion in 'Blogs & CMS usage' started by Jimmy, Nov 28, 2015.

  1. ModeltogTossen

    ModeltogTossen I wish I could??

    313
    97
    28
    Dec 20, 2015
    Denmark
    Ratings:
    +143
    Local Time:
    8:57 AM
    1.9.12
    10.0.23
    Just one thing - is the -> jr5. * <- a typo? - What I mean - is the space between . * allowed? - should it not be jr5.*..

    If allowed - then please ignore my reply.
     
  2. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    I'm not sure if it's allowed technically, but it works... the permissions were granted for the user on the db.

    @eva2000 the Jamroom developer cleared up the issue with a fix. Install successful! Thanks for all your help. :)

    Once I get the vhost 100% working I'll publish everything to the OP.
     
  3. eva2000

    eva2000 Administrator Staff Member

    44,717
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,797
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    awesome to hear :)
     
  4. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    @eva2000 what's the different between running the ownership root:nginx vs. nginx:nginx.

    The reason I'm asking is that with Jamroom I'm was not able to execute du, convert, or diff and they're all installed (on the server) and the locations are correct (in the script). The script has a basic function to test if those are executable and the results were returning false. I did the chmod to nginx:nginx and now everything is working fine except for the ImagicK which is still showing as "not executable".

    I guess I'm just curious which is better root:nginx or nginx:nginx? Would there be any security issues with one over the other? Is it recommended to chmod the public directory for most installs? I'm running IPB 4 with root:nginx and it seems to work fine.

    Thanks for any information you can provide on this.
     
  5. eva2000

    eva2000 Administrator Staff Member

    44,717
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,797
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Getting Started Guide step 2
     
  6. eva2000

    eva2000 Administrator Staff Member

    44,717
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,797
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    FAQ item 26 ?
     
  7. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    I must have read over that getting started guide 100 times and never saw the switching of the permissions. I only noticed it in the IPB 3 guide you have and wondered if that was specific for IPB 3. Thanks for the link! I can't believe I missed that.

    So is the open_basedir the reason ImagicK isn't working?
     
  8. eva2000

    eva2000 Administrator Staff Member

    44,717
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,797
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    could be if php is calling convert or other ImagicK commands outside of public directory
     
  9. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    I'll give that a try.

    Thank you again, I appreciate all your help, suggestions, and opinions! :) You make coming to this forum and using the LEMP a really nice experience.
     
  10. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    Update. The developer is looking into some issues with Jamroom using Nginx. He believes that it has to do with the conversion of the htaccess file. Once those items are sorted out, I'll post a vhost conf file in the OP.
     
  11. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
  12. eva2000

    eva2000 Administrator Staff Member

    44,717
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,797
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    nice :)
     
  13. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    Still having issues with some of the images in the ACP. The developer said he got it working on a vanilla nginx install using

    Code:
    server {
            listen 80 default_server;
            listen [::]:80 default_server ipv6only=on;
            client_max_body_size 256M;
            root /usr/share/nginx/html;
            server_name ubuntu.jamroom.net;
            access_log /var/log/nginx/access.log;
            error_log /var/log/nginx/error.log;
    
            location @rewrite {
                rewrite ^(.*)$ /modules/jrCore/router.php?_uri=$1 last;
            }
    
            location / {
                autoindex on;
                index index.html index.php sitemap.xml /modules/jrCore/router.php;
                try_files $uri $uri/ @rewrite;
            }
            location ~ \.php$ {
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    include fastcgi_params;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            }
    }
    
    But I can't get the images to display with my version of the conf file.

    Untitled-2.jpg

    Do you see anything in there that would need to be changed in one of the include files. I didn't.

    I posted it in the thread on the Jamroom forum. Hopefully, I'll get some feedback... hopefully... most (all) of them run Apache. I think I'm the only one running Jamroom on Nginx.
     
  14. eva2000

    eva2000 Administrator Staff Member

    44,717
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,797
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    try commenting out
    Code:
    include /usr/local/nginx/conf/staticfiles.conf;
    
    What is an example url link to the broken image ? and where does that image reside on local path ?
     
  15. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    That's it! Got the images showing.

    Is there anything in that file that I need? I don't want to not include that file if there is something I need in it.
     
  16. eva2000

    eva2000 Administrator Staff Member

    44,717
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,797
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    depends on that
     
  17. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    Those images are "special" images. The developer has those only in the ACP and they have a special path. I'm going to check with the developer to see if he has any thoughts.

    Below is the location that is causing the issue for the ACP images.

    Code:
    location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
        gzip_static off;
        #add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        access_log off;
        expires 30d;
        break;
            }
     
  18. eva2000

    eva2000 Administrator Staff Member

    44,717
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,797
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    depending on image url path you can do the same as what you did to exclude some .php locations via specifying a specific path location match for those special image paths so it isn't matched by staticfiles.conf defined image location match
     
  19. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    I posted a reply on the thread I have going over on Jarmoom. Since it's only affecting these specific images and not any other images in the script, I wanted to ask Brian (Jamroom Developer). Here is the thread: Index Not Found - The Jamroom Network | Jamroom
     
  20. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:57 AM
    1.17.x
    MariaDB 10.3.x
    Here was the reply from the developer:

    I've been looking online but couldn't really find a good if / else example so I could exclude a specific directory from a location.

    Do you have any ideas how I might exclude a directory from that specific location? I tried a couple different things and had no success.

    I tried with no luck:

    Code:
    location ^~ /image/img/module/jrCore/*){
            allow all;
        }
    
        location ^~ /module/jrCore/*){
                allow all;
            }
    
        location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
    
        gzip_static off;
        #add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        access_log off;
        expires 30d;
        break;
            }