Search Articles

Select a Category

Stock Quotes

DJIA10465.94  chart-1.22
NASDAQ2254.70  chart+3.01
S&P 5001101.60  chart+0.07
^HSI21029.81  chart-64.01
^TNX2.91  chart-0.92
JNK39.42  chart+0.00
TIP106.37  chart+0.38
000001.SS2637.50  chart-10.61
GLD115.49  chart+1.20
SLV17.58  chart+0.34
MON57.84  chart-0.07
ROK54.15  chart-0.46
S4.57  chart-0.19
STP9.94  chart-0.36
VDSI6.37  chart+0.11
VE26.60  chart-0.25
VISN4.01  chart+0.12
FSLR125.45  chart-10.05
GOOG484.85  chart-0.14
DL5.59  chart-0.04
MSFT25.81  chart-0.22
BSX5.60  chart+0.00
SCHW14.79  chart-0.25
SPWRA12.43  chart-0.23
INTC20.60  chart-0.43
2010-07-30 16:02

The Daily Dilbert

How to Enable Mod_Rewrite in Ubuntu

Introduction:

There are several packages I used require Apache2 module mod_rewrite. I had problem to enable it for a long time. I could not find a clean answer on how to do it. Finally, I figured it out. Here are the steps. Here is a screen shot of the phpinfo.php

PHPInfo without mod_write Module

Enable Mod_Rewrite Steps:

1. Edit /etc/apache2/sites-available/default. Changed “AllowOverride None” to “AllowOverride All” in the two places below.

NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
# AllowOverride None    #Original Line
# New Line
AllowOverride All
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
# AllowOverride None    #Original Line
# New Line
AllowOverride ALL
Order allow,deny
allow from all
</Directory>
….
2. Edit /etc/apache2/sites-enabled/000-default. Changed “AllowOverride None” to “AllowOverride All” in the two places shown above as well.
3. Enable mod_rewrite with the following command: a2enmode rewrite

4. Force reload the apache2 server with:  sudo /etc/init.d/apache2 force-reload

Now if you load the phpinfo.php, you can see that mod_rewrite is enabled.

PHPInfo shows mod_write Module

VN:F [1.8.8_1072]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.8_1072]
Rating: 0 (from 0 votes)
  • Share/Bookmark

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>