Reputation: 977
I am having an Amazon EC2 Instance, I have enable the mod_rewrite but htacess not working.
Also while changing /etc/apache2/sites-available/default setting AllowOverride none to AllowOverride All it is giving me internal server error.
Am I missing something.
Upvotes: 2
Views: 2011
Reputation: 620
Suppose It's showing some Internal Server Error First, you activate ModRewrite feature:
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
Upvotes: 0
Reputation: 5501
Here is what I try and that work for me
sudo vim /etc/apache2/apache2.conf
remove comment sign (#)
AccessFileName .htaccess
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride
None
Require all granted
</Directory>
AllowOverride All
I found this on https://webmasters.stackexchange.com/questions/61009/how-to-enable-use-of-htaccess-in-apache-on-ubuntu/61022#61022
Upvotes: 1
Reputation: 18550
internal server error.
Means there is something wrong with the .htaccess
file likely
Check /var/log/httpd/error.log
it may give you the line. but it will tell you whats wrong
Upvotes: 1