404 not found error and broken vbulletin 5 after upgrade

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • habili
    Senior Member
    • Jan 2018
    • 253
    • 4.2.x

    404 not found error and broken vbulletin 5 after upgrade

    when i upgrade vbulletin 4 to vbulletin 5, my forum is broken and can't be loaded completelly, in inspect element of google chrome i can see many 404 error.

    Click image for larger version

Name:	vbulletin5-4.png
Views:	1108
Size:	143.1 KB
ID:	4386646


    i copy vbulletin in forum directory of my nginx server root directory.

    my nginx configurations are as bellow :

    PHP Code:
    server {
        
    listen 80;

        
    server_name 185.81.97.106;

            
    # document root for request,  uncomment and set proper value
        # this should reflect the path that your vBulletin is installed in.
        # This is usually /var/www/public_html/forumpath
            
    root   /usr/share/nginx/html/forums/;
            
    index   index.php index.html index.htm;
            
    client_max_body_size 20M;
        
    access_log /var/log/nginx/forum.access.log  main;
        
    error_log  /var/log/nginx/forum.error.log;

        
    # configuration rules
            # legacy css being handled separate for performance
            
    location = /forums/css\.php {
                    
    rewrite ^ /forums/core/css.php break;
            }

        
    location ~* ^.+\.(javascripts|js|json|ico|gif|jpg|jpeg|pdf|png|css|woff|ttf|otf|eot)$ {
            
    root /usr/share/nginx/html/forums/;
            
    access_log off;
            
    log_not_found   off;
            
    expires max;
            
    gzip_static on;
        }


            
    # make install available from presentation
            
    location ^~ /forums/install {
                    
    rewrite ^/forums/install/ /forums/core/install/ break;
            }

            
    # any request to not existing item gets redirected through routestring
            
    location /forums/ {
                    if (!-
    f $request_filename) {
                            
    rewrite ^/forums/(.*)$ /forums/index.php?routestring=$1 last;
                    }
            }

            
    # make admincp available from presentation
            
    location ^~ /forums/admincp {
                    if (!-
    f $request_filename) {
                            
    rewrite ^/forums/admincp/(.*)$ /forums/index.php?routestring=admincp/$1 last;
                    }
            }

            
    # process any php scripts, not found gets redirected through routestring
            
    location ~ \.php$ {
                    
    # handles legacy scripts
                    
    if (!-f $request_filename) {
                            
    rewrite ^/(.*)$ /index.php?routestring=$break;
                    }

                    
    fastcgi_split_path_info ^(.+\.php)(.*)$;
                    
    fastcgi_pass php5;
                    
    fastcgi_index index.php;
                    
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include 
    fastcgi_params;
                    
    fastcgi_param QUERY_STRING $query_string;
                    
    fastcgi_param REQUEST_METHOD $request_method;
                    
    fastcgi_param CONTENT_TYPE $content_type;
                    
    fastcgi_param CONTENT_LENGTH $content_length;
                    
    fastcgi_intercept_errors on;
                    
    fastcgi_ignore_client_abort off;
                    
    fastcgi_connect_timeout 60;
                    
    fastcgi_send_timeout 180;
                    
    fastcgi_read_timeout 300;
                    
    fastcgi_buffers 256 16k;
                    
    fastcgi_buffer_size 32k;
                    
    fastcgi_temp_file_write_size 256k;
            }
    }

    upstream php5 {
        
    # address to accept FastCGI requests. Make sure you set the right value under your fast cgi conf.
            # e.g.- Ubuntu 12.10 using php5-fpm Ubuntu /etc/php5/fpm/pool.d/www.conf
        
    server    127.0.0.1:9000;

    my server url is :




    how can you help me to solve the problem ?
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74166

    #2
    You did not rename the htaccess.txt file to .htaccess as specified in the installation/upgrade instructions.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • habili
      Senior Member
      • Jan 2018
      • 253
      • 4.2.x

      #3
      Originally posted by Wayne Luke
      You did not rename the htaccess.txt file to .htaccess as specified in the installation/upgrade instructions.
      i did not change htaccess.txt file.

      Comment

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24288
        • 6.0.X

        #4
        You need to change it.

        Rename it to .htaccess
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • habili
          Senior Member
          • Jan 2018
          • 253
          • 4.2.x

          #5
          Originally posted by Mark.B
          You need to change it.

          Rename it to .htaccess
          htaccess does not work on the nginx web server. htaccess workes on the apache web servers.
          Last edited by habili; Mon 19 Feb '18, 5:08am.

          Comment

          • Mark.B
            vBulletin Support
            • Feb 2004
            • 24288
            • 6.0.X

            #6
            For nginx, please read this:
            https://www.vbulletin.com/docs/html/...arefiles_nginx
            MARK.B
            vBulletin Support
            ------------
            My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
            My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

            Comment

            • Wayne Luke
              vBulletin Technical Support Lead
              • Aug 2000
              • 74166

              #7
              If it still doesn't work after editing your server configuration and rebooting the server, you will have to have your server administrator fix it. We're unable to provide direct support for changing the configuration on NGINX servers.
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud demonstration site.
              vBulletin 5 API

              Comment

              • habili
                Senior Member
                • Jan 2018
                • 253
                • 4.2.x

                #8
                Originally posted by Wayne Luke
                If it still doesn't work after editing your server configuration and rebooting the server, you will have to have your server administrator fix it. We're unable to provide direct support for changing the configuration on NGINX servers.





                thanks for replay
                My problem was resolved with below codes :

                PHP Code:
                server {
                    
                listen 80;

                    
                server_name you ip address;
                    
                root   /usr/share/nginx/html/;
                    
                index  index.php index.html index.htm;
                        
                client_max_body_size 20M;
                   
                large_client_header_buffers 4 16k;

                    
                access_log /var/log/nginx/forum.example.access.log  main;
                    
                error_log  /var/log/nginx/forum.example.error.log;

                    
                rewrite /forums/css.php$    /forums/core/css.php  last;
                   
                # rewrite /install$    /core/install/ last;
                   # rewrite /forums/admincp$    /forums/admincp/  last;



                #############

                location /forums/ {


                rewrite thread([\d]+)-([\d]+).html /showthread.php?t=$1&page=$break;
                rewrite thread([\d]+).html /showthread.php?t=$break;
                rewrite forum([\d]+)-([\d]+).html /forumdisplay.php?f=$1&page=$break;
                rewrite forum([\d]+).html /forumdisplay.php?f=$break;


                rewrite ^/forums/(.*) /forums/index.php?routestring=$1 last;
                }


                # make admincp available from presentation
                        
                location ^~ /forums/admincp {
                                if (!-
                f $request_filename) {
                                        
                rewrite ^/forums/admincp/(.*)$ /forums/index.php?routestring=admincp/$1 last;
                                }
                        }


                location ~ /forums/(?!index)[^/]+\.php$ {
                rewrite ^/forums/(.*) /forums/index.php?routestring=$1 last;
                }

                location ~* ^.+.(js|json|ico|gif|jpg|jpeg|pdf|png|css|woff|ttf|otf|eot)$ {
                root /usr/share/nginx/html;
                }


                ###################
                        
                location ~ \.php$ {
                        
                root           /usr/share/nginx/html;
                        
                fastcgi_pass   127.0.0.1:9000;
                        
                fastcgi_index  index.php;
                        
                fastcgi_read_timeout 300;
                        include /
                etc/nginx/fastcgi_params;
                        
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                        
                fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
                        
                fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
                        
                fastcgi_max_temp_file_size 0;
                        }



                    
                location ~* ^.+\.(js|json|ico|gif|jpg|jpeg|pdf|png|css|woff|ttf|otf|eot)$ {
                        
                root /usr/share/nginx/html/forums/;
                        
                access_log off;
                        
                log_not_found   off;
                        
                expires 7d;
                        
                add_header Pragma public;
                        
                add_header Cache-Control “public”;
                        
                add_header Access-Control-Allow-Origin *;
                    }





                Comment

                Related Topics

                Collapse

                Working...