Login page reloads many times, and gives after that a "Forbidden"

Today we want to release a askbot site for a very big community ... the last 2 weeks I tested the script, but today I can't login.

Every time I goes to the login page: http://domain.tld/account/signin/

The site reloads ~5-6 times in one or two seconds, and gives me then a 403 HTTP Forbidden page, in my apache logfile stands for every try:

[error] [client 95.117.xxx.xxx] client denied by server configuration: /srv/mydjangosite/django.wsgi, referer: http://domain.tld/account/signin/

I deleted my whole site cookies, restart the database, the memcached, apache, tried to "manage.py collectstatic" "manage.py migrate" "manage.py syncdb", nothing helps.

The path to the django.wsgi is correct in the apache vhost, this is the file:

import os
import sys

current_directory = os.path.dirname(__file__)
parent_directory = os.path.dirname(current_directory)
module_name = os.path.basename(current_directory)

sys.path.append(parent_directory)
sys.path.append(current_directory)
os.environ['DJANGO_SETTINGS_MODULE'] = '%s.settings' % module_name
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

The path to the urls.py is correct, this is the file:

"""
main url configuration file for the askbot site
"""
from django.conf.urls.defaults import patterns, include, handler404, handler500, url
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'%s' % settings.ASKBOT_URL, include('askbot.urls')),
    (r'^admin/', include(admin.site.urls)),
    #(r'^cache/', include('keyedcache.urls')), - broken views disable for now
    (r'^settings/', include('askbot.deps.livesettings.urls')),
    (r'^followit/', include('followit.urls')),
    (r'^robots.txt$', include('robots.urls')),
    url( # TODO: replace with django.conf.urls.static ?
        r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
        'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT.replace('\\','/')},
    ),
)

if 'rosetta' in settings.INSTALLED_APPS:
    urlpatterns += patterns('',
                    url(r'^rosetta/', include('rosetta.urls')),
                )

my settings.py looks like:

## Django settings for ASKBOT enabled project.
import os.path
import logging
import sys
import askbot
import site

ASKBOT_ROOT = os.path.abspath(os.path.dirname(askbot.__file__))
site.addsitedir(os.path.join(ASKBOT_ROOT, 'deps'))

DEBUG = True#set to True to enable debugging
TEMPLATE_DEBUG = False#keep false when debugging jinja2 templates
INTERNAL_IPS = ('127.0.0.1',)

ADMINS = (
    ('xxxxx', 'xxxxx@xxxxx.xxxxx'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = 'postgresql_psycopg2' # only postgres (>8.3) and mysql are supported so far others have not been tested yet
DATABASE_NAME = 'xxxxx'             # Or path to database file if using sqlite3.
DATABASE_USER = 'xxxxx'             # Not used with sqlite3.
DATABASE_PASSWORD = 'xxxxx'         # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

#outgoing mail server settings
SERVER_EMAIL = 'xxxxx@xxxxx.xxxxx'
DEFAULT_FROM_EMAIL = 'xxxxx@xxxxx.xxxxx'
EMAIL_HOST_USER = 'xxxxx'
EMAIL_HOST_PASSWORD = 'xxxxx'
EMAIL_SUBJECT_PREFIX = '[xxxxx] '
EMAIL_HOST='mail.xxxxx.xxxxx'
EMAIL_PORT='25'
EMAIL_USE_TLS=True
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

IMAP_HOST = ''
IMAP_HOST_USER = ''
IMAP_HOST_PASSWORD = ''
IMAP_PORT = ''
IMAP_USE_TLS = False

TIME_ZONE = 'Europe/Berlin'

SITE_ID = 1

USE_I18N = True
LANGUAGE_CODE = 'de'

MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'askbot', 'upfiles')
MEDIA_URL = '/upfiles/'
STATIC_URL = '/m/'#this must be different from MEDIA_URL

PROJECT_ROOT = os.path.dirname(__file__)
STATIC_ROOT = os.path ...
(more)
Edur's avatar
56
Edur
asked 2012-09-24 07:00:27 -0500
todofixthis's avatar
1.3k
todofixthis
updated 2012-09-24 09:13:25 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments