localhost 500 internal server

23,866

this solved. today i was tried all ways to fix this problem, finaly i remove apache2, than reinstall again. but when i edit 000-default file, i see .htaccess in my / root dir, so i rename the file then i restore my dummy TLD domain, and its work. thanks for adv.

Share:
23,866

Related videos on Youtube

Anggagewor
Author by

Anggagewor

Just Simple man....

Updated on September 18, 2022

Comments

  • Anggagewor
    Anggagewor over 1 year

    Yesterday localhost is still work, but this morning localhost is down with 500 internal server error.

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

    Here the logs:

    /var/log/apache2/error.log
    [Tue Dec 17 11:44:36 2013] [alert] [client 127.0.0.1] /.htaccess: Invalid command 'disable', perhaps misspelled or defined by a module not included in the server configuration
    
    
    access.log
    127.0.0.1 - - [17/Dec/2013:11:44:36 +0700] "GET /favicon.ico HTTP/1.1" 500 630 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36"
    

    My /etc/hosts:

    127.0.0.1       localhost
    127.0.1.1       asus
    127.0.1.1       kd.com
    127.0.1.1       www.kd.com
    127.0.1.1       angga.net
    127.0.1.1       www.angga.net
    127.0.1.1       www.dok.com
    127.0.1.1       dok.com
    

    i was tried this :

    root ~ #  a2enmod rewrite
    Module rewrite already enabled
    
    
    root ~ #  a2enmod
    Your choices are: actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authnz_ldap authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgi cgid charset_lite dav dav_fs dav_lock dbd deflate dir disk_cache dump_io env expires ext_filter file_cache filter headers ident imagemap include info ldap log_forensic mem_cache mime mime_magic negotiation php5 proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi reqtimeout rewrite setenvif speling ssl status substitute suexec unique_id userdir usertrack version vhost_alias
    Which module(s) do you want to enable (wildcards ok)?
    rewrite
    Module rewrite already enabled
    

    And this is my spec :

    root ~ #  uname -a
    Linux asus 3.8.0-35-generic #50~precise1-Ubuntu SMP Wed Dec 4 17:25:51 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    
    root ~ #  php -v
    PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:27:25) 
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    
    root ~ #  apache2 -v
    Server version: Apache/2.2.22 (Ubuntu)
    Server built:   Jul 12 2013 13:37:10
    
    root ~ #  mysql --version
    mysql  Ver 15.1 Distrib 5.5.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.1
    

    EDIT I : There is no .htaccess in my /var/www/ dir.

    EDIT 2 :

    here is my apache2.conf

    http://www.heypasteit.com/clip/13G7

    and here for ls -al /var/www

    http://www.heypasteit.com/clip/13H7

    • MadMike
      MadMike over 10 years
      Welcome to Ask Ubuntu. The error log mentions that there is a problem with a ".htaccess"-file. Files that begin with a dot are hidden by default. Open nautilus and press Crtl + h to show those hidden files. Navigate to /var/www and have a look if there is a ".htaccess"-file.
    • chaos
      chaos over 10 years
      1. Can you post your apache configuration, maybe your config doesn't point to /var/www/. 2. list the folder with ls -a /var/www/ in the terminal, .htaccess-files are "hidden" dot-files, maybe your filemanger doesn't list them...
    • Anggagewor
      Anggagewor over 10 years
      i was edit the question. but like i said before. there is no .htaccess in my /var/www dir. i was check it via file manager by pressing ctrl+h for display hidden file/dir but there is no .htaccess .
    • ankush981
      ankush981 about 9 years
      This helped me too. From now on error logs are my favorite thing! :-)
  • Benjamin Maurer
    Benjamin Maurer over 9 years
    Please accept this answer so this issue can be closed. The community bot has bumped this question back to the front page.