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
phpstorm-8

Ignore .idea folder from git in PHPStorm

By default (?) PHPStorm will create a hidden folder named .idea directly within your project, containing user-specific stuff like chosen

composer

[Link] How to require versions of PHP, HHVM / HipHop, GD, curl, openssl etc. with Composer

Jeremy Kendall has just published a short and excellent overview on how to require versions of PHP (and explicit 64-bit

Microsoft announces “holographic” 3D interfaces (promo video)

Microsoft has just announces the damn future in business und consumer electronics! Interactive, “holographic” 3D environments, usable without a keyboard,

php

Why Modern PHP is Awesome And How You Can Use It Today (Slides by Matt Stauffer)

phpstorm-8

A PHPStorm shortcuts cheat sheet (for Windows, Mac OS and Linux)

Shortcuts that will make you life so much easier! Please note: Frontend Devs might be irritated by the weird CTRL-Y-shortcut,

php

A super-simple introduction into PHP namespaces (7min video)

Once again, Jesse of JREAM totally nails it right on the head. A super-simple introduction into PHP namespaces. If you

Material Design – How Google designed Android L (7min video)

A very interesting insight into Android L’s (= Android 5.0) new design and the ideas behind. Android was always #3

forbes 30 under 30

Need motivation ? Check out these 2 awesome “FORBES 30 under 30” lists (web, UI, games)

The FORBES magazine has just published the new “30 under 30” lists, and they are really really interesting! Lots of

ubuntu-14.04-lts

First view: Ubuntu 14.04 LTS brings PHP 5.5 and Apache 2.4

Short first view on Ubuntu 14.04 LTS (= long term service): I just tried out the alpha1 version of the

[Link] Improving Smashing Magazine’s Performance: A Case Study

The title says it all: A very interesting guide through the optimization process on one of the largest blogs in

1/4

Categories

Search

GitHub finally introduces repo traffic stats
php
Awesome list of Design Patterns with PHP code examples
[Link] Improving Smashing Magazine’s Performance: A Case Study
css4
Angelina Fabbro talks about “CSS4” in this excellent conference video
Create a fast, perfect and bootable 1:1 Windows backup (full clone of HDD) for SSD migration
Material Design – How Google designed Android L (7min video)
How to setup a config-free WordPress, PHP and MySQL (for local development) in Windows 7 / 8 in under 3 minutes
composer
A short & simple Composer tutorial
php
How to install latest PHP 5.4.x on Ubuntu 12.04 LTS (Precise Pangolin)
Adobe releases Firebug-like developer tools to edit and extract PSDs
vagrant
Generate Vagrant boxes with Laravel, HipHop, Nginx, WordPress, MySQL, MariaDB, MongoDB, RabbitMQ etc. with one click
Bézier Curves – Under the Hood (4min video)
Joshua Davis – my hero of Flash – in two excellent interviews (audio, video)
laracon-2014-eu-amsterdam
Laracon 2013 – Jordi Boggiano: In Depth Composer (47min video)
set up a local virtual machine for development with vagrant and puphpet / puppet (and ubuntu, linux, php, apache, mysql)
A list of downloadable Vagrant boxes (CentOS 5.9 / 6.4, Ubuntu 12 / 13, Debian 6 / 7 / 7.1 / 7.2)

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