1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.htaccess problem

Discussion in 'Apache' started by Raithe, Jun 11, 2007.

Thread Status:
Not open for further replies.
  1. #1
    About 80% of the domains running on my box get "500 Internal Server Error" when I have a .htaccess running.



    Internal Server Error
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    
    Please contact the server administrator, webmaster@raithesoft.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    
    More information about this error may be available in the server error log.
    Apache/2.2.4 (Unix) PHP/5.2.2 Server at zelune.net Port 80
    Code (markup):
    Did I make a mistake in compiling apache? Is this some other problem? Anyone have this problem before?

    Sorry for the questions, but any help would be appreciated.
     
    Raithe, Jun 11, 2007 IP
  2. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Most common reason when .htaccess is the culprit is when the server side scripting language, e.g. PHP, is run as a CGI binary (not an Apache module). When this is the case, you cannot modify settings through .htaccess.
     
    krt, Jun 12, 2007 IP
  3. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What's in the .htaccess files?

    If a .htaccess file contains a command for a module not enabled on your server, it'll just throw a 500. Check your Apache error log and it'll give you more info than the message displayed.
     
    rodney88, Jun 12, 2007 IP
  4. Raithe

    Raithe Well-Known Member

    Messages:
    1,923
    Likes Received:
    177
    Best Answers:
    0
    Trophy Points:
    175
    #4
    krt: I will have my tech look into that. Thanks

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^zelune.net
    RewriteRule (.*) http://www.zelune.net/$1 [R=301,L]

    Thats it....
     
    Raithe, Jun 12, 2007 IP
  5. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Still can't say for certain without seeing the actual error message from the error log but I'd guess you don't have mod_rewrite enabled. Unless you're sure it is - in which case ignore me - you can check by your httpd.conf file.

    There should be the following lines in there, but not necessarily together. Make sure neither line is commented out; i.e. there is not a # at the start of the line. If you need to, remove the # (and save and restart, obviously).

    LoadModule rewrite_module     modules/mod_rewrite.so
    AddModule mod_rewrite.c
    Code (markup):
     
    rodney88, Jun 12, 2007 IP
  6. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #6
    Well it's not likely that you'll be entering loadModule directives per vhost, and so I would guess because it's 80% those 80% will have php landing pages and the problem is likely to be with your php installation.

    tail /usr/local/apache/logs/error_log

    post the output of that......
     
    krakjoe, Jun 12, 2007 IP
  7. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #7
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^zelune\.net [NC]
    RewriteRule ^(.*)$ http://www.zelune.net/$1 [R=301,L]
     
    Nintendo, Jun 12, 2007 IP
  8. Raithe

    Raithe Well-Known Member

    Messages:
    1,923
    Likes Received:
    177
    Best Answers:
    0
    Trophy Points:
    175
    #8
    Same error. It must be apache related. I will try installing mod_rewrite again and see if I can fix it.
     
    Raithe, Jun 13, 2007 IP
  9. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #9
    grep mod_rewrite.so /usr/local/apache/conf/httpd.conf

    the output of that should give you something like :

    LoadModule rewrite_module libexec/mod_rewrite.so

    if there is a # at the beginning of the line remove it, if nothing appears then you haven't added mod_rewrite to your apache configuration.
     
    krakjoe, Jun 13, 2007 IP
Thread Status:
Not open for further replies.