Welcome to Centmin Mod Community
Register Now

Xenforo I created my own static/cdn sub domain, now I got problems with xenforo attachments

Discussion in 'Forum software usage' started by rdan, Apr 5, 2015.

  1. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    9:53 AM
    Mainline
    10.2
    Here's my latest config:
    Code:
    server {
        listen 80;
        server_name static.phcorner.net;
    
        # ngx_pagespeed & ngx_pagespeed handler
        include /usr/local/nginx/conf/pagespeed_phcorner.conf;
        include /usr/local/nginx/conf/pagespeedhandler.conf;
        include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
        log_not_found off;
        error_log off;
        root /home/nginx/domains/phcorner.net/public;
    
        location / {
            if ($request_filename ~ "\.(css|js|jpg|jpeg|gif|ico|png|bmp|pict|csv|doc|pdf|pls|ppt|tif|tiff|eps|ejs|swf|midi|mid|ttf|eot|woff|otf|svg|svgz|webp|docx|xlsx|xls|pptx|ps|class|jar)$") {
                    add_header Cache-Control "public, must-revalidate, proxy-revalidate";
            access_log off;
            expires 30d;
            break;
                    }
            return 301 http://www.phcorner.net$request_uri;
            }
    }
    But, XenForo attachment not working now :(
    Any advice? Thanks!

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    11:53 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what do you mean not working ?
     
  3. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    9:53 AM
    Mainline
    10.2
    All file attachment downloaded with "download" file name without extension.
    upload_2015-4-5_8-35-35.png
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    11:53 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  5. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    9:53 AM
    Mainline
    10.2
  6. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    11:53 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you're on your own there never used that addon
     
  7. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    9:53 AM
    Mainline
    10.2
  8. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    11:53 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Glad it helped :)