Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Install, Uninstall, Remove and reinstall apache2

Posted on by Kim

To see which is installed:

dpkg -l | grep apache

To install apache2 on ubuntu:
sudo apt-get install apache2 apache2.2-common

To remove
sudo apt-get remove apache2 apache2.2-common --purge

apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2.2-common

Enable .htaccess in apache2

Posted on by Kim

Go to /etc/apache2/sites-available
sudo vi default
Change 'AllowOverride None' to 'AllowOverride All'

and restart:
sudo /etc/init.d/apache2 restart



Note: Should be done by:
add new entry in /etc/apache2/sites-available and
Add by:
sudo a2ensite [name] // Means that there will be a new link in /etc/apache2/sites-enabled

Remove by:
sudo a2dissite [name]