title: Serving Django admin site on subdomain
body: <p>I have a project running Django, uWSGI, and Nginx. Currently I use the default Django admin site, served at <code>example.com/admin</code>. I want to change this so that the admin site is only available at <code>admin.example.com</code>.</p>
  
  <p>What is the best way to do this?</p>
  
  <p>I had thought about starting a completely new Django project to be served on <code>admin.example.com</code> but with the same database settings as the project that runs <code>example.com</code>, but I'm hoping for something more elegant since this would involve duplicating a lot of the settings and apps between the projects. Basically the only difference between the two would be that one would have the admin site and URL pattern installed and one would not.</p>
  
  <p>(My reason for this is eventually wanting to use something like <a href="http://word.bitly.com/post/47548678256/google-auth-proxy" rel="nofollow">google auth proxy</a> to protect the admin site but have non-admin logins go through the normal authentication backend. It looks like I could do this by specifying that Django use HTTP Basic Auth for <code>admin.example.com</code>, but stick with the default backend for <code>example.com</code>.)</p>