Here are the appropriate configuration files, also at http://dpaste.com/97213/ .

The apache config is presently working, because being able to access 'example.com/' shows me the index.html file I've placed in the document root.

Let me serve Django/applications in the prefix '/d', so 'example.com/d/' would load the default application, 'example.com/d/app3' would load another, as set up in web addresses.py.

Serving Django, I am while using recommended mod_wsgi, on Linux.

Presently, I'm able to access check in application at 'example.com/d', however when the @login_needed decorator attempts to send me towards the login page, I recieve delivered to 'example.com/accounts/login', as opposed to the expected 'example.com/d/accounts/login'.

Because the default application loads properly, I am unsure what I am doing wrong here, or if this sounds like a bug in Django when producing the web addresses.

Any suggestions?

EDIT: Like a note, basically alter the apache config line: WSGIScriptAlias /d /home/blah/django_projects/Tickets/apache/django.wsgi to WSGIScriptAlias / /home/blah/django_projects/Tickets/apache/django.wsgi The applying, leaving comments, and signing in all work fine. Extending its love to 'example.com/admin' loads the admin, although I have left the admin media damaged, so no stylesheets are loaded.

--- Configs Follow:

#
# /home/blah/django_projects/Ticket/urls.py
#
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
	(r'^', include('ticket.urls')),
	(r'^admin/', include(admin.site.urls)),
	(r'^comments/', include('django.contrib.comments.urls')),
)


#
# /home/blah/django_projects/Ticket/apache/django.wsgi
#
import os, sys

sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')

sys.path.append('/home/blah/django_projects')
sys.path.append('/home/blah/django_projects/Tickets')

os.environ['DJANGO_SETTINGS_MODULE'] = 'Tickets.settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()


#
# /etc/apache2/sites-available/django_tickets_wsgi (apache conf)
#
NameVirtualHost *
<VirtualHost *>  

	Alias /media /home/blah/django_projects/Tickets/media


	WSGIScriptAlias /d /home/blah/django_projects/Tickets/apache/django.wsgi
	WSGIDaemonProcess exmaple_com user=blah group=blah processes=1 threads=10
	WSGIProcessGroup example_com

	ServerAdmin localhost@example.com
	ServerName example.com

	DocumentRoot /var/www/

	<Directory /var/www/>
		Options -Indexes FollowSymLinks -MultiViews -Includes 
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined
	ServerSignature Off

</VirtualHost>

This can be a possible duplicate of http://stackoverflow.com/questions/1036186/django-apache-redirect-problem, as that answer solved this issue.

I only eventually happened on that answer by opening many of the 'related questions' here, just from desperation. From my perspective, I believe my question has some valuable "search friendly" words.

EDIT: The solution: (via alex vasi)

Items to try:

  1. Change current domain to "yourdomain.tld/cflow" within the "sites" framework. It's not hard to do using django admin or dumpdata/loaddata manage.py instructions.
  2. Appears like your internet site is using login_needed decorator. For the reason that particular situation you can include to configurations.py:

    LOGIN_URL = '/[prefix]/accounts/login/'