Welcome to Centmin Mod Community
Become a Member

IP.Board IPB v4.1.x Files

Discussion in 'Forum software usage' started by Jimmy, Nov 9, 2015.

  1. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    The OP has been updated with the latest example and updated to solve a twitter embed issue.

     
  2. eva2000

    eva2000 Administrator Staff Member

    47,475
    10,760
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,718
    Local Time:
    1:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Yeah usually this is commented out by default
    Code:
    #add_header X-Frame-Options DENY;
     
  3. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    It took me forever to find out the issue. It was actually Microsoft 10 Edge which displayed the error which I researched online. That led me back to the vhost and those lines. For once a Microsoft browser was the solution to an issue... instead of the cause of one. :LOL:
     
  4. eva2000

    eva2000 Administrator Staff Member

    47,475
    10,760
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,718
    Local Time:
    1:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    nice detective work :)
     
  5. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    @eva2000

    Does the gzip need to be included in the file? Someone on the IPB forum told me to remove it and I wanted to check with you. Is that included in another file or should I add it back to the vhost file? Thanks!

    Code:
    # GZIP static content not processed by IPB.
    gzip  on;
    gzip_static on;
    gzip_http_version 1.1;
    gzip_vary on;
    gzip_comp_level 3;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/x-javascript application/xml application/xml+rss text/javascript application/javascript text/x-js;
    gzip_buffers 16 8k;
    gzip_disable "MSIE [1-6].(?!.*SV1)";
    
     
  6. eva2000

    eva2000 Administrator Staff Member

    47,475
    10,760
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,718
    Local Time:
    1:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    yes remove it as it's already enabled server wide in /usr/local/nginx/conf/nginx.conf in http {} context
     
  7. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    Thank you! I will relay your response over there. I appreciate all the help!

    BTW... for the first time I actually enjoyed reading a newsletter. I never even knew I signed up for one, but thanks, it had some great information!
     
  8. eva2000

    eva2000 Administrator Staff Member

    47,475
    10,760
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,718
    Local Time:
    1:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    cheers I don't like spam myself but if it's bug or security related to Centmin Mod, i try to let end users know :D
     
  9. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    No problem here. The more I know the better. :)
     
  10. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    4:30 PM
    1.9.9
    10.1.10
    Noticed two things with this config.
    Code:
    # Allow access to JS file
    location ~^/(applications/core/interface/js/js.php) {
        include /usr/local/nginx/conf/php.conf;
        allow     all;
    }
    
    This does not seem to work and if you use the image proxy for ssl you also need to allow access to /applications/core/interface/imageproxy/imageproxy.php.
    I rewrote the rules as follows:
    Code:
    # Allow access to imageproxy   
    location ^~ /applications/core/interface/imageproxy/imageproxy.php {
        include /usr/local/nginx/conf/php.conf;
        allow  all;
    }
    
    # Allow access to JS file
    location ^~ /applications/core/interface/js/js.php {
        include /usr/local/nginx/conf/php.conf;
        allow  all;
    }
    
    As a side note, I am not using the CODEB tag because it doesn't like spacing.
    [​IMG]
    @eva2000
     
  11. eva2000

    eva2000 Administrator Staff Member

    47,475
    10,760
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,718
    Local Time:
    1:30 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  12. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    Which is the correct way? The second one I'm using and works on my forum. Had to allow that so the block manager would work in the front-end.

    Code:
    location ^~ /applications/core/interface/js/js.php {
        include /usr/local/nginx/conf/php.conf;
        allow  all;
    }
    or

    Code:
    location ~^/(applications/core/interface/js/js.php) {
        include /usr/local/nginx/conf/php.conf;
        allow     all;
    }
     
  13. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    4:30 PM
    1.9.9
    10.1.10
    This is correct.

    You can test it yourself by browsing to the file in your browser, if it returns a 403 error then your rule is not working.
     
  14. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    I have it setup the other way and I don't get a 403 when browsing to that file.
     
  15. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    4:30 PM
    1.9.9
    10.1.10
  16. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    You have the "forum" in that rule.
     
  17. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    I've noticed some other people having issues when IPB is inside another directory. There was a poster on the IPB forum putting IPB in "main" he was having all kinds of issues with the vhost file.
     
  18. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    4:30 PM
    1.9.9
    10.1.10
    That is intended, I have my forum installed in a sub directory.
     
  19. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    There was a poster on the IPB forum putting IPB in "main" he was having all kinds of issues with the vhost file.
     
  20. Jimmy

    Jimmy Well-Known Member

    1,725
    367
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +937
    Local Time:
    10:30 AM
    1.17.x
    MariaDB 10.3.x
    I have mine in the root directory and everything is working for me. Why would it make a difference if it was in a sub-directory... hmm.