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.
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.
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.
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....
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):
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......
RewriteEngine on RewriteCond %{HTTP_HOST} ^zelune\.net [NC] RewriteRule ^(.*)$ http://www.zelune.net/$1 [R=301,L]
Same error. It must be apache related. I will try installing mod_rewrite again and see if I can fix it.
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.