7

I have a manually installed LAMP environment on Ubuntu 15.10 Desktop and when I came to install Drupal 8 on it i've seen that clean URLs are disabled, so I turned on the Apache2 (2.4.12) rewrite module in the terminal via:

sudo a2enmod rewrite

Than I got:

Module rewrite already enabled

And yet when I cleared the browsers' cache and refreshed the installation page I still get:

Clean URLs Disabled.

Your server is capable of using clean URLs, but it is not enabled. Using clean URLs gives an improved user experience and is recommended.

So, if I turned on the rewrite module, why Drupal 8 still can't use them?

  • I think most of these questions are flagged as off-topic. In order to diagnose the issue, you should provide the Apache version as this makes a difference. – mradcliffe Dec 29 '15 at 15:11
  • Updated the version. – JohnDoea Dec 29 '15 at 15:13
  • Sometimes the test fails, while it shouldn't. You can try to force them om and see what happens: drupal.stackexchange.com/questions/121958/… – Neograph734 Dec 29 '15 at 16:02
9

I was having the same problem, I opened the /etc/apache2/apache2.conf file and located this portion of the file

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

And found that AllowOverride is set to None. Go ahead and replace it with All.

Restart your apache service when done.

  • Hi Shabir! From some reason this file is empty when I open it with Geany ... Is there another file maybe ? – JohnDoea Dec 29 '15 at 15:35
  • Have you tried cd /etc/apache2 and ls the files – Shabir A. Dec 29 '15 at 15:39
  • I edited the code, the file name is apache2.conf – Shabir A. Dec 29 '15 at 15:39
  • Shabir, it worked for me only when I changed the rest of the AllowOverride directives to All, and not only that one (btw, at your document there seems to be Require all granted by nature... At me at was "Require all denied" but I changed it also to granted... Anyways, now it seems to work fine and the notification no longer appear in the setup. – JohnDoea Dec 29 '15 at 17:00

protected by Community Dec 23 '17 at 16:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.