Google Add

Search

How to Enable/Install apache mod_rewrite and mod_headers in ubuntu


Last week while i was working on url_rewriting i face the problem. I had written the rule in .htaccess but forget to enable the mod_rewrite. Remember your .htaccess rule will not work until you enable the mod_rewrite.


How to install Apache2 on ubuntu


Just go to terminal and write the following command





sudo apt-get install apache2

Now you have installed Apache2 write the command mentioned below to enable mod_rewrite


 
sudo a2enmod rewrite
After enable the mod_rewrite do the changes on following file

Go to 


/etc/apache2/sites-available/default



Options Indexes FollowSymLinks MultiViews
AllowOverride all         /* By default AllowOverride none is written so delete none and write all*/
Order allow,deny
allow from all


after that restart the apache


Linux file permission basics

Enable mod_headers in apache


sudo a2enmod headers

Remember to restart apache 

To restart apache2 write on terminal


sudo /etc/init.d/apache2 restart


Top Ten Most Useful Linux Commands

No comments:

Post a Comment