My site was copied from production to test server. It works on Drupal 7 + Nginx + PostgreSQL. On production, user login works fine, but on test server I receive a 403 error on users/admin (or user/1) where I'm redirected after login.

What I've already checked/done:

  1. Database tables cache_* and sessions are empty.
  2. User admin in the database has: uid = 1, status = 1, roles = 2 (authorized), 3 (administrator), 10 (site admin)
  3. Try to open in IE, Chrome, Firefox. All history (cache and cookies) were deleted.
  4. In file sites/default/settings.php there are the variables $base_url = "http://mytest.domain.com", and $cookie_domain = "mytest.domain.com"
  5. nginx.conf contains such rules for 403 error:

    location ~ \..*/.*\.php$ {
        return 403;
    location ~ ^/sites/.*/private/ {
      return 403;
    location ~ (^|/)\. {
      return 403;

    Also all fastcgi_cache options are commented out.

  6. Permissions on server: sites/default - 775 (folders), 644 (files); sites/default/files - 775 (folders), 644 (files).

  7. Also I see that login field in the users table is updated when I login, but the watchdog table and sessions table don't contain rows about the session being open.

  8. php.ini: opcache.enable = 0

How can I fix the 403 error?

1 Answer 1


I've found a problem. As I said, I'm new to this project and recently I've found that it uses a Memcache module to save sessions. But both memcached and php5-memcached were not installed on my test server.

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.