Apache2 Yourls .htaccess 500 internal error

0 votes
asked May 7, 2011 by Jim (465 points)
Hello, I'm running Ubuntu Server 10.10 on a dedicated server, I have installed Apache2, PHP, MySQL, and have multiple domains running off of it, which is all fine.. but my issue is on domain2.com, where anytime I have a .htaccess file anywhere, in the /var/www/* directory, which the domain2.com is pointed to /var/www/grabs, I get a 500 Internal Server Error, but I don't get it, when I'm on domain1.com..
I was wondering, if anyone had a fix for this issue? As long as there isn't a .htaccess file anywhere in Apache, domain2.com works like a charm.

NOTE: Domain1 and domain2 aren't my sites, they were used to identify each different site.

[Fri May 06 18:27:57 2011] [alert] [client IP address removed] /var/www/lrn2.us/.htaccess: Invalid command '{\\rtf1\\ansi\\ansicpg1252\\cocoartf1038\\cocoasubrtf350', perhaps misspelled or defined by a module not included in the server configuration, referer: http://lrn2.us/

<IfModule mod_rewrite.c>
RewriteRule ^([0-9A-Za-z]+).qr/?$ http://chart.apis.google.com/chart?

RewriteEngine On
RewriteBase /grabs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /grabs/yourls-loader.php [L]

# BEGIN WithoutWWW
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.lrn2\.us$ [NC]
RewriteRule ^(.*)$ http://lrn2.us/$1 [R=301,L]
# END WithoutWWW
commented May 7, 2011 by Jim (465 points)
Would this have to do with anything, either:
 * Restarting web server apache2
[Fri May 06 18:27:12 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
 ... waiting [Fri May 06 18:27:13 2011] [warn] NameVirtualHost *:80 has no VirtualHosts

1 Answer

0 votes
answered May 7, 2011 by Hugo (1,691 points)
Does it all work through port 80? Otherwise you need to go into apache.conf and change the NameVirtualHost so that you can use port 80, that might fix it. Otherwise, the code looks fine. By the looks of the error it's found an invalid command...
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.