Logo
  • PHP
    • HipHop / HHVM
    • Modern PHP
    • PHPStorm
    • LAMP
    • Laravel
    • Composer
    • PDO
  • JavaScript
    • node.js
    • AngularJS
  • CSS
    • SASS
    • “CSS4” (CSS level 4)
  • HTML
  • Git
  • LAMP
  • Vagrant
  • UI / UX
  • Architecture of …
  • Off-Topic
With ♥ from Berlin
April 21, 2014
Chris
LAMP, Linux, Local Development, PHP, Server, Ubuntu
Comments Off on How to enable mod_rewrite in Ubuntu 14.04 LTS

How to enable mod_rewrite in Ubuntu 14.04 LTS

PreviousNext

A little note first: This is the most basic way to enable mod_rewrite. However, it’s not the best way. The more correct way would be to setup a vhost and change its config, but unless you are a professional and know exactly what you do this thing will do the job perfectly.

Please note that Ubuntu 14.04 LTS comes with Apache 2.4, while Ubuntu 12.04 LTS came with Apache 2.2. This new version introduced different default config filenames and in general some differences.

 

Activate the mod_rewrite module with

sudo a2enmod rewrite

and restart the apache

sudo service apache2 restart

To use mod_rewrite from within .htaccess files (which is a very common use case), edit the default VirtualHost with

sudo nano /etc/apache2/sites-available/000-default.conf

Search for “DocumentRoot /var/www/html” and add the following lines directly below:

<Directory "/var/www/html">
    AllowOverride All
</Directory>

Save and exit the nano editor via CTRL-X, “y” and ENTER.

Restart the server again:

sudo service apache2 restart

Voila! To check if mod_rewrite is installed correctly, check your phpinfo() output. It should have this in it:

mod-rewrite-apache-2-4

apachemodmod_rewriterewrite
Share this
vagrant

A super-simple Vagrant LAMP stack bootstrap (installable with one command)

As I have to setup servers inside Vagrant quite often, sometimes 10 times per day, I started to use provisioning:

hearthbleed-ssl-bug

A quick guideline on how to fix the Hearthbleed bug (and update OpenSSL) on Ubuntu

If you still haven’t fixed your servers after mainstream discovery of the legendary Hearthbleed bug, then do it now –

phpstorm-8

When PHPStorm’s cache eats up your harddisk space

I recently stumbled over this: By default PHPStorm (obviously in all versions since 1.0) creates a local history of all

php

“Belt” adds very clever everyday functions to PHP, comes with JavaScript naming styles and eventually solves the needle/haystack problem

This little projects is basically super-simple, but somehow really really clever and definitly a time-saver: Belt is a typical Composer-loaded

steam sale coupon voucher

-30% to -90% on Steam and Origin

Soft off-topic, but as most developers like to play from time to time, this might be your change to grab

“Fuck you. Pay Me.” How to deal with clients, the professional way. An excellent talk with Mike Monteiro.

Excellent (and very useful) speech by Mike Monteiro about how to deal with clients, how to create a professional relation

photoshop-cc-deal

Adobe offers Photoshop for $9.99 per month (limited deal)

Currently Adobe offers the very latest version of Photoshop (which is Photoshop CC) for just $9.99 or 12,99€ (EU zone:

O’Reilly’s Learning JavaScript Design Patterns by Addy Osmani for free

Addy Osmani has published his excellent book Learning JavaScript Design Patterns for free! You can read the entire book including

php

How to prevent PHP sessions being shared between different apache vhosts / different applications

When you run multiple applications on one server, you might run into the session-sharing problem: All your applications share the

sass

New features in SASS 3.3 (a talk by SASS-creator Chris Eppstein)

A very interesting conference talk by Chris Eppstein, creator of SASS itself, showing some of the new features in SASS

1/4

Categories

Search

php
How to prevent PHP sessions being shared between different apache vhosts / different applications
php
Awesome list of Design Patterns with PHP code examples
You made a mess with Git ? Here’s a flowchart guideline on how to fix
php-legacy-code
Interesting talk on modernizing a legacy PHP codebase
redaktionelle-hochlastseiten
Hochlastseiten mit PHP, MySQL und Apache am Beispiel stern.de (deutscher Artikel)
sass laravel
Extremely easy SASS in Laravel (with pure PHP)
php
Slides from International PHP Conference 2014
Symfony devs: Creator of Symfony framework is hiring (Cologne, Germany)!
goodbye-lamp-going-hhvm-nosql-nginx-php
[RePost] Goodbye LAMP: Going Nginx, NoSQL, HHVM (41min conference talk with Arne Blankerts)
css3-chrome-font
[Link] Retinafy your Site / Device by Nijiko Yonskai
How to fix the ugly font rendering in Google Chrome
JavaScript ECMAScript6 – A short video introduction (5min)
php
How to install latest PHP 5.4.x on Ubuntu 12.04 LTS (Precise Pangolin)
pdo-debug
Debug PDO with this one-line function. Yeah!
Meet the developers behind Ableton (14min video)

Tags

apache bash centos composer conference coupon CSS debian fonts framework git GitHub hack HHVM HipHop HTML HTML5 IDE JavaScript JS LAMP laravel linux mod_rewrite MVC MySQL Nginx optimization PHP PHP 5.5 PHP 5.6 phpmyadmin PHPStorm security server SSD Ubuntu UI UX vagrant video virtual machine voucher VPS wordpress
Side-Project: Wordle-Solver:
www.wordle-helper.info

Pages

  • Privacy Policy