I installed Drupal with Drush and it all works fine and the welcome page appears as well. But when I try to log in (with whatever account) it shows me the: "Object not found! The requested URL was not found on this server...." page.

I am on Arch Linux. I checked the httpd.conf file and mode_rewrite engine is enabled: "LoadModule rewrite_module modules/mod_rewrite.so"

I was also suggested to check the .htaccess file extension, but it has no ".txt" extensions.

Also, I went to index.php?q=user url and it did respond: opened the User account page.

I am still suspecting something with httpd.conf and .htaccess fils, but they look fine to me. I failed to find any resource related directly to this problem.

Just to clarify further. Both /drupal and /drupal/index.php urls are displayed without errors. But when I try to log in as an admin (or any user) and submit it, it shows the error page I described above. Which is a problem, because I can't even enable clean urls, as it requires permissions for that.

I checked if the httpd.conf file (as suggested by comment below) is configured to read the .htaccess file:

AccessFileName .htaccess

And although the file was missing that section, I found out that httpd.conf file reads .htaccess file by default, if not configured otherwise. Despite this, I added that line, but it still shows the same error when logged in.

Also, the following are the httpd.conf lines:

DocumentRoot "/srv/http"

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
  • 1
    so to debug that your .htaccess file is being used by your webserver you can put any text on .htacess file, so in turn this will cause 500 internal error when you will access the site, it error comes then problem might be somewhere else otherwise there is an issue with configuration of your server that is not being able to read your .htacess file – arpitr Jan 4 '14 at 17:47
  • Great @arpitr, I followed that and solved it. I am going to answer my own question, so that others can see it as well. Appreciate that :) – Davit Magaldadze Jan 4 '14 at 18:28

I think your true problem is that clean URLs aren't working (as evidenced by index.php?q=user does work). It may also suggest another Apache configuration problem.

Make sure your httpd.conf is configured to read .htaccess

AccessFileName .htaccess

I don't know the last time I saw a system that didn't have this (sometimes was different on older WAMP installs).

Then, browse to http://example.com/index.php?q=admin/config/search/clean-urls

Set clean URLs if you can.

If you can't set clean URLs, then you have an Apache configuration problem.

If browsing directly to http://example.com/index.php works, but http://example.com/ doesn't, then I suspect your configuration doesn't allow Apache overrides for that DOCROOT. That would also explain why clean URLs aren't working. The general option you need to set is AllowOverride. My general setup looks like:

<VirtualHost *:80>
  ServerName example.com
  ServerAlias *.example.com

  DocumentRoot /var/www/example/docroot

  <Directory /var/www/example/docroot>
    Options -MultiViews
    AllowOverride All

The AllowOverride line will

  • disable index listings for directories
  • allow the htaccess to reset the index order to use index.php first
  • override other options that may be set in your httpd.conf
  • I added a few lines to the question. This is really confusing... :( By the way, when I install drupal manually, it all works fine. – Davit Magaldadze Jan 4 '14 at 8:26
  • I answered the question below, explaining how I solved it. So, you really got it all right :) So, I am marking yours as the correct answer. Thank you. – Davit Magaldadze Jan 4 '14 at 18:41

I did the following that solved the issue:

As I mentioned above, I am on Arch Linux where web root is /srv/http. And as @MPD suggested, I set the

AllowOverride All

In the httpd.conf file. But this didn't work. Then I followed @arpitr's suggestion to check if .htaccess file is being read at all and I discovered that it wasn't. I went back to the httpd.conf file discovered that I had changed AllowOverride All only in the following section:

<Directory />
    AllowOverride All

But as @MPD pointed out, it should have been changed under web root section as well:

<Directory "/srv/http">
    AllowOverride All

What confused me was the difference of web roots on different distros used by MPD and myself.

  • 1
    The difference is that I use nearly the stock httpd.conf from CentOS, and then use virtual hosts with a specific config per host. I even do this when I have a single site running on a server. – mpdonadio Jan 4 '14 at 20:01

In my case I fixed this disabling fast_404 module in the settings.php file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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