title: Django Change Root URL
body: <p>I am trying to complete the Django starter <a href="https://docs.djangoproject.com/en/1.5/intro/tutorial01/" rel="nofollow">tutorial</a>.</p>
  
  <p>I have the site working fine on the django test web server. I am trying to get it working on Apache.</p>
  
  <p>I have setup Apache so <code>http://mydomain.com/mysite/</code> will get to the Django root project (mysite). However I cannot get to Polls, because I think it's expecting <code>http://mydomain.com/polls/</code></p>
  
  <p>How do I change the projects root url from <code>http://mydomain.com/polls/</code> to <code>http://mydomain.com/mysite/polls</code> ?</p>
  
  <p>I have tried the following in the root urls.py file:</p>
  
  <pre><code>urlpatterns = patterns('',
      url(r'^mysite/' include('mysite')),
      url(r'^polls/', include('polls.urls', namespace="polls")),
      url(r'^admin/', include(admin.site.urls)),
  )
  </code></pre>
  
  <p>But it isn't working. I have searched through as much documentation as I can find, and I can't find the answer to this.</p>
  
  <p>My Apache config is as follows:</p>
  
  <pre><code>WSGIScriptAlias "/mysite/" /usr/local/mysite/mysite/wsgi.py
  WSGIPythonPath /usr/local/mysite
  
  &lt;VirtualHost *:80&gt;
    &lt;Directory /usr/local/mysite/mysite&gt;
      &lt;Files wsgi.py&gt;
        Order deny,allow
        Allow from all
      &lt;/Files&gt;
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>@scriptmonsters answer changed the root URL, however now Apache is appending everything after the root url to the location of the wscgi file. So if I try <a href="http://myhost.com/mysite/polls/" rel="nofollow">http://myhost.com/mysite/polls/</a> I get <code>not found</code> and this in the apache log:</p>
  
  <pre><code>[Wed Nov 06 12:49:23 2013] [error] [client 109.144.246.190] Target WSGI script not found or unable to stat: /usr/local/mysite/mysite/wsgi.pypolls
  </code></pre>
  
  <p>(note that the file it tried to access is <code>wsgi.pyPOLLS</code>)</p>