Welcome to Centmin Mod Community
Become a Member

vBulletin Help CSS in Vbulletin

Discussion in 'Forum software usage' started by computer19852007, Jun 26, 2014.

  1. computer19852007

    computer19852007 Member

    49
    4
    8
    Jun 25, 2014
    Ratings:
    +4
    Local Time:
    10:48 PM
    Centmin Mod 1.2.3-eva2000.06
    MariaDB 5.5.34
    I have used Vbulletin Suite 4.2.2 P1

    My nginx.conf
    Code:
    server {
        listen       80;
        server_name diendantinhoc.vn;
        return       301 http://www.diendantinhoc.vn$request_uri;
    }
    
    server {
      server_name www.diendantinhoc.vn;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
    ssi  on;
    
      access_log /home/nginx/domains/diendantinhoc.vn/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/diendantinhoc.vn/log/error.log;
    
      root /home/nginx/domains/diendantinhoc.vn/public;
    
      location / {
    
    
    
    # block common exploits, sql injections etc
    include /usr/local/nginx/conf/block.conf;
    
      # Enables directory listings when index file not found
    autoindex  on;
    
      # Shows file listing times as local time
      #autoindex_localtime on;
    
      # Enable for vBulletin usage WITHOUT vbSEO installed
      #try_files         / /index.php;
    
    try_files $uri $uri/ @rewrite;
    }
    
            location /includes {
            allow 127.0.0.1;
            deny all;
            }
    
            location /packages {
            allow 127.0.0.1;
            deny all;
            }
    
            location /vb {
            allow 127.0.0.1;
            deny all;
            }
    
            location /admincp {
            include /usr/local/nginx/conf/php.conf;
            #auth_basic "Private";
            #auth_basic_user_file /usr/local/nginx/conf/htpasswd;
            }
    
    location @rewrite {
        # Forum
        rewrite    /threads/.*                /showthread.php?$uri&$args      last;
        rewrite    /forums/.*                /forumdisplay.php?$uri&$args    last;
        rewrite    /members/.*                /member.php?$uri&$args          last;
        rewrite    /blogs/.*                /blog.php?$uri&$args            last;
        rewrite    /entries/.*                /entry.php?$uri&$args           last;
        rewrite    /content/.*                /content.php?$uri&$args           last;
     
        
        # MVC
        rewrite    ^/(?:(.*?)(?:/|$))(.*|$)$        /$1.php?r=$2                    last;
    
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
    And i have post new Artice, and i have save it, but it reload and it show error: Please view image attach. I have config Store CSS Stylesheets as Files in admincp

    Screenshot_3.png

    Please Help Me, @eva2000

    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    27,810
    6,347
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,365
    Local Time:
    1:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    did you make sure that /clientscript/vbulletin_css/*.css and /clientscript/*.js files actually do exist and to chmod 0777 the vbulletin_css directory as instructed in vB docs ?

    also for now comment out /usr/local/nginx/conf/block.conf line and restart nginx just to make sure there still isn't anymore conflicts with /usr/local/nginx/conf/block.conf
     
  3. computer19852007

    computer19852007 Member

    49
    4
    8
    Jun 25, 2014
    Ratings:
    +4
    Local Time:
    10:48 PM
    Centmin Mod 1.2.3-eva2000.06
    MariaDB 5.5.34
  4. eva2000

    eva2000 Administrator Staff Member

    27,810
    6,347
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,365
    Local Time:
    1:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  5. computer19852007

    computer19852007 Member

    49
    4
    8
    Jun 25, 2014
    Ratings:
    +4
    Local Time:
    10:48 PM
    Centmin Mod 1.2.3-eva2000.06
    MariaDB 5.5.34
    Thank you @eva2000
    I have used firefox, and it work. thank you
     
  6. eva2000

    eva2000 Administrator Staff Member

    27,810
    6,347
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,365
    Local Time:
    1:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    for Chrome, not sure if this would work but adding a Content Security Policy might help

    in your domain Nginx vhost try adding just below your

    Code:
    server_name www.diendantinhoc.vn;
    the following line
    Code:
    add_header X-WebKit-CSP "default-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval'";
    
    restart nginx server and see if it works

    check your browser's developer tools and console for blocked resources which are due to CSP

    You can use Content Security Policy generator at http://cspisawesome.com and/or http://cspbuilder.info to further customise your specific domain's CSP using browser developer tools/console for troubleshooting. I just did this for this forum's CSP and ended up with the following:

    More info on Content Security Policies at https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policy and http://www.html5rocks.com/en/tutorials/security/content-security-policy/ and https://bitcoinsecurityproject.org/...policy-x-content-security-policy-x-webkit-csp
     
    Last edited: Jun 27, 2014
  7. computer19852007

    computer19852007 Member

    49
    4
    8
    Jun 25, 2014
    Ratings:
    +4
    Local Time:
    10:48 PM
    Centmin Mod 1.2.3-eva2000.06
    MariaDB 5.5.34
    I have add and restart nginx, but it not working in google chrome

     
  8. eva2000

    eva2000 Administrator Staff Member

    27,810
    6,347
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,365
    Local Time:
    1:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    oh well worth a try :)

    edit: or try

    Code:
    add_header Content-Security-Policy "default-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval'";
     
    • Like Like x 1
  9. eva2000

    eva2000 Administrator Staff Member

    27,810
    6,347
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,365
    Local Time:
    1:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1