On Nov 13, 6:48 am, "Serdar T." <[EMAIL PROTECTED]> wrote:
> Can someone offer advice on server deployment headaches involving
> apache/mod_wsgi/nginx? I seem to be having two problems:
>
> 1) Apache/mod_wsgi correctly serves dynamic content from a test app
> (located in a ~/public_html directory) when the url starts with
> "www". But apache reverts to serving the default index.html (out of /
> var/www) when the "www" is omitted from the url. I tried tweaking the
> ServerAlias configs and even using Rewrite rules, but to no avail.
>
> Ideally, I'd like apache and nginx to rerwite all urls to strip the
> leading "www"
>
> My server config and relevant django app files (settings.py and
> urls.py) are athttp://dpaste.com/90308/
> They are an adaptation of the configs from EricFlo's screencast 13
> (http://thisweekindjango.com/screencasts/episode/21/django-ground-
> episode-13/)
What if you list all host names in single ServerAlias directive and
not multiple.
http://httpd.apache.org/docs/2.2/mod/core.html#serveralias
> 2) In addition, the admin backend doesn't work on the production
> server (I get a 404 error) regardless of whether or not I pre-pend the
> "www". Apache error logs stated that the sqlite database backend did
> not have write permissions, but the 404 errors persisted even after I
> added the permissions (chmod 755).
You have:
ADMIN_MEDIA_PREFIX = '/media/'
yet that doesn't appear to be where media files are being served from.
Your configuration is a bit confusing with nginx in front and both
nginx and Apache both attempting to serve static files. Suggest you
get Apache working with static files first and ignore nginx until you
have that working and understand how things are affected by Django
settings for media.
Graham
> Any suggestions would be greatly appreciated!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---