Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 4055  / 1 Year ago, sun, april 9, 2023, 12:44:01

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

More From » apache2

 Answers
1

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.


[#37762] Sunday, April 9, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
darpose

Total Points: 424
Total Questions: 99
Total Answers: 121

Location: Jersey
Member since Fri, Oct 1, 2021
3 Years ago
darpose questions
Sun, Jan 23, 22, 04:32, 2 Years ago
Tue, Apr 25, 23, 23:44, 1 Year ago
Wed, Dec 15, 21, 14:42, 2 Years ago
Wed, Jun 2, 21, 23:41, 3 Years ago
;