I am setting up Drupal locally in my Ubuntu. I used drush to download and install Drupal 7. (using mysqladmin to create the database and the user)

All worked well, I have the default homepage, but when I try to do any action (logging in, registering) I get a 404. I imagine the mod_rewrite doesn't work..

I installed the Apache module and enabled it, restarted the server, but no lack...

I am guessing mod_rewrite needs more parameterization...?

update: I can access correctly the page with this url:


so I guess my mod_rewrite clearly doesn't work as it should..

  • 1
    Do you have AllowOverride None in your httpd.conf or vhost file for that site's web root? If so try changing that to AllowOverride All and restarting Apache
    – Clive
    Oct 16, 2012 at 20:04
  • hm, my /etc/apache2/httpd.conf file is empty.. it's there, but it's empty. Oct 16, 2012 at 20:09
  • What about in sites-enabled/default (or something similar) that'll be the default vhost file on Ubuntu I think
    – Clive
    Oct 16, 2012 at 20:11
  • it was already set to AllowOverride All ... :( Oct 16, 2012 at 20:17

2 Answers 2


Have you verified that the .htaccess file from the Drupal 7 core package is in the website root?

You can easily download and extract that file from drupal.org base package: http://drupal.org/project/drupal

  • the .htaccess file is in the website root. (I think as I used drush to deploy, everything was done as it should from the Drupal perspective..) it's mostly something with Apache Oct 16, 2012 at 20:22
  • 1
    I had copied the site over and somehow the hidden files (.htaccess) did not get copied over. I looked all over for an answer - Thanks!!
    – Wavesailor
    Jan 18, 2017 at 7:27

I just realized I had not restarted apache2 service after enabling mod_rewrite... It works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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