1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 New host - Internal Server Error

Discussion in 'Troubleshooting and Problems' started by sbj, Sep 10, 2014.

  1. sbj

    sbj Well-Known Member

    Hello,

    after one year abstinence I want to restart my project.

    So I had to move from my old hosting company to a new one.

    In cpanel I restored my home directory and database.

    I can visit my website, the main page is functioning. But anything else doesnt fuction. I cant login, or go to a topic.

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.


    I dont know what I do wrong. Please help me.

    Regards.
     
  2. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    rename .htaccess file to htaccess.bak and see what happens...
     
  3. sbj

    sbj Well-Known Member

    This happens now after renamed it.

    Not Found
    The requested URL /online/ was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
     
  4. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    that means there's some variable in your .htaccess file which your new host does not support... Can paste the contents of the .htaccess file here for me to look at... remember to remove any sensitive info present ;)
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Inspecting the server error logs should help with identifying the cause.

    However, log in to the ACP directly and disable Friendly URLs and test again.
     
    sbj likes this.
  6. sbj

    sbj Well-Known Member

    Code:
    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>
    
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        RewriteBase /xenforo
        RewriteBase /public
    
        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
    AuthUserFile "/home/.../.htpasswds/public_html/passwd"
    AuthName "public_html"
    AuthType Basic
    require valid-user
    


    How can I login into ACP directly?
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    domain.com/admin.php
     
    sbj likes this.
  8. sbj

    sbj Well-Known Member

    Wow, you are the best.

    Yes, I could directly login and I disabled friendly URLs and now it works.

    Ok, nice. Thank you.

    How can I make it work with friendly URLs?
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    You will need to configure the server.

    Contact your host to confirm that they have mod_rewrite installed and allow overrides via an .htaccess file.
     
  10. sbj

    sbj Well-Known Member

    They say it is activated.

    I guess my .htaccess file is corrupted or something.

    What should I do?
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    You can try with a default .htaccess and see if that works.

    Code:
    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>
    
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        #RewriteBase /xenforo
    
        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
     
    sbj likes this.
  12. sbj

    sbj Well-Known Member

    Thank, you for the awesome support.

    It works now.
     

Share This Page