If you use virtual machines for Linux development, or rebuild your host OS from time to time like I do, resetting Apache configuration is something you do often… but not often enough to remember every little step perhaps! So, whilst this article duplicates others on the web, like the rifle from Platoon… this one is mine.

Did you install your LAMP stack already?

You can install a LAMP stack quickly using

sudo apt-get install tasksel
sudo tasksel

the next thing that I install is webmin. Even for a local machine, this makes the process of finding and editing configuration files a breeze.

You can find documentation on installing webmin on any Debian based OS here..

Once you have installed webmin, log in by connecting to and using any account that is in the sudoers group. The account that you used to install and run tasksel in the first place should be perfect.

Update your Apache configuration to support clean URLs

  1. Go to Servers -> Apache Webserver.
  2. Click on the “Global Configuration” tab.
  3. Click on “Modules”
  4. Turn on the rewrite module
  5. Restart Apache
  6. Go to Servers -> Apache Webserver.
  7. Click the “Default Server” globe
  8. Click on the /var/www/ directory
  9. Edit the directives
  10. Change the AllowOverride None to AllowOverride All
  11. Save changes
  12. Restart Apache (again)

Clean URLs should now work in any application installed under /var/www/