Announcement

Collapse
No announcement yet.

404 not found error and broken vbulletin 5 after upgrade

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:	258
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 :

    http://185.81.97.106/forums/


    how can you help me to solve the problem ?

  • #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 customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment


    • #3
      Originally posted by Wayne Luke View Post
      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


      • #4
        You need to change it.

        Rename it to .htaccess
        MARK.B | vBULLETIN SUPPORT

        TalkNewsUK - My vBulletin 5.5.4 Demo
        AdminAmmo - My Cloud Demo

        Comment


        • #5
          Originally posted by Mark.B View Post
          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 19th Feb '18, 5:08am.

          Comment


          • #6
            For nginx, please read this:
            https://www.vbulletin.com/docs/html/...arefiles_nginx
            MARK.B | vBULLETIN SUPPORT

            TalkNewsUK - My vBulletin 5.5.4 Demo
            AdminAmmo - My Cloud Demo

            Comment


            • #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 customization and demonstration site.
              vBulletin 5 Documentation - Updated every Friday. Report issues here.
              vBulletin 5 API - Full / Mobile
              I am not currently available for vB Messenger Chats.

              Comment


              • #8
                Originally posted by Wayne Luke View Post
                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...
                X