I'm getting really frustrated today, while trying to just set up my development environement and start doing some actual work.
After installing php, apache2 and mysql over apt-get install phpmyadmin
I'm trying since about an hour, to make .htaccess files work in my /var/www/projectname/.htaccess
I tried out multiple solutions, that basically told me to edit /etc/apache2/sites-available/default
but none of them seemed to work.
What I tried:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
#AllowOverride All
#AllowOverride AuthConfig FileInfo Indexes Limit Options=All, MultiViews
Order allow,deny
allow from all
</Directory>
The commented lines are what I tried, both didnt work. I either get a 500 internal error (when I set AllowOverride All
) or the .htaccess doesnt do anything.
Can someone help me here? I need to get this to work, to finally start working :)
As side note, my knowledge with ubuntu or linux in common, is very slim - I just do what google tells me.
cat /etc/issue: Ubuntu 11.10
You need to enable
AllowOverride all
.The 500 error is occuring because there's a bug in the htaccess which is either causing an infinite loop and making apache get confused or doing something else weird. Most likely because of a typo. Paste in the htaccess file and we can have a look.
Also, run the command
sudo a2enmod rewrite
to ensure that the htaccess rewrite functions work.When I get this error it usually is a permission issue make sure apache2's user/ group have read permissions on the files and execute permissions on the directory..
I think this could help a little. http://www.linuxforums.org/forum/servers/5270-apache-conf-html-permissions.html