Samet Kilictas’s Blog

.htaccess problem at Apache2 (Ubuntu)

by Samet Kilictas on Sep.08, 2008, under HowTo, Linux, Ubuntu

Hi, Everyone,

Today i have faced with a problem which made me sick of apache2. Since i’ve done with this stupid problem it will be my pleasure to writing solution to my blog page   :)

Ok!, If you are running apache2 first you should know about that you got the configuration file at ;

sudo nano /etc/apache2/apache2.conf -> just check out this file to see what it contains exaclty

and you can see error log’s at ;

sudo nano /var/log/apache2/error.log  -> which helps a lot

So, to enable .htaccess files on your server first you have to edit ;

sudo nano /etc/apache2/sites-available/default

when you open this file you have to see some lines like;

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

you have to be sure the Document root is correct. Then you need to change the “AllowOverride None” to “AllowOverride All” then we are done with this part.

And now as step2 to enable .htaccess file your apache2 you should enable rewrite.load mod. If you take a look at /etc/apache2 directory you are going to see that there are some folders like “mods-available” and “mods-enabled”. mods-available folder contains some mods for apache2 which you may use. mods-enable folder only contains the mods which are enable :)
This is the tricky point, if you don’t copy the rewrite.load file from mods-available to mods-enable, your apache2 isn’t going to load rewrite mod.  Even you are done with /etc/apache2/sites-available/default file since the mod is didnt load so you will get “500 Internal Server Error“.

Samet

VN:F [1.0.6_327]
Rating: 4.0/10 (2 votes cast)
:, ,
No comments for this entry yet...

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...