How to enable clean url with Ubuntu 16.04, Drupal 8.1.10 and Apache 2

Use below process to enable clean url with Ubuntu 16.04:

  1. Enable apache mode rewrite -

    a2enmod rewrite
    
  2. put below code into /etc/apache2/sites-available/000-default.conf

    <Directory /var/www/html>
     Allowoverride All
    </Directory>
    
  3. service apache2 restart

This is working for me...