NGINX XenForo 404 on versioned parameter files

CYBORG

Active Member
The issue is that NGINX 404's files. My XenForo community link: https://legacypk.com/forums

R4TSM.png


Inside my nginx.conf:

Code:
server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   legacypk;
            index  index.php index.html index.htm;
            try_files $uri $uri/ /index.php?$uri&$args;
        }
       
        location /forums/ {
        index index.php index.html index.htm;
        try_files $uri $uri/ /forums/index.php?$uri&$args;
}

location /forums/install/data/ {
        internal;
}

location /forums/install/templates/ {
        internal;
}

location /forums/internal_data/ {
        internal;
}

location /forums/library/ {
        internal;
}

location /forums/src/ {
        internal;
}

    location ~* \.(?:js|css)$ {
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public";
        if (!-e $document_root$document_uri) {
            rewrite ^ /index.php last;
        }
    }

    location ~* \.(?:ico|gif|jpe?g|png|cur)$ {
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public";
        add_header Vary "Accept,Accept-Encoding";
        try_files $uri index.php;
        if (!-e $document_root$document_uri) {
            rewrite ^ /index.php last;
        }
    }

    location ~* \.(?:eot|ttf|woff|otf|svg)$ {
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public";
        add_header Access-Control-Allow-Origin "*";
    }

    location = /favicon.ico {
        allow all;
        log_not_found off;
        access_log off;
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public";
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }


        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   legacypk;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           legacypk;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }
 
Back
Top