Re: Production install 'admin' failing with 500 internal server error
Ccorrection: The names and paths in WSGIScriptAlias and Directory were inconsistent. The sample config file should read as follows: httpd/conf.d/python.conf LoadModule wsgi_module modules/mod_wsgi.so WSGIDaemonProcess myapp WSGIProcessGroup %{GLOBAL} WSGIReloadMechanism Process Alias /media/ /usr/local/www/media/ Order allow,deny Allow from all Alias /site_media/ /usr/local/www/site_media/ Order allow,deny Allow from all WSGIScriptAlias /myapp /usr/local/django-apps/myapp/apache/django.wsgi Order allow,deny Allow from all On May 14, 11:11 am, Vincent wrote: > Hi Dan, > > Thanks for the tips. I think I've figured out what went wrong. > > First up: no, I am not using a virtualenv. I was able to serve the > site using "./manage.py runserver" albeit a bit slow (due to load > issues I believe). So the problem ultimately was my mod_wsgi setup. > > The fix: > > For starters, my httpd.conf file was poorly configured. I had defined > the wrong user and group under the "WSGIDaemonProcess" directive. > Ultimately, what I should've done was used the defaults instead of > defining things. The documentation on the mod_wsgi wiki lead me to > think otherwise. > > So my current config is as follows: > > > httpd/conf.d/python.conf > > > LoadModule wsgi_module modules/mod_wsgi.so > > WSGIDaemonProcess myapp > WSGIProcessGroup %{GLOBAL} > WSGIReloadMechanism Process > > Alias /media/ /usr/local/www/media/ > > > Order allow,deny > Allow from all > > > Alias /site_media/ /usr/local/www/site_media/ > > > Order allow,deny > Allow from all > > > WSGIScriptAlias /snufkin /usr/local/django-apps/snufkin/apache/ > django.wsgi > > > Order allow,deny > Allow from all > > > > > My second issue was related to the first, I had the wrong user & group > for my django application. Chown-ing things to apache:apache did the > trick. I realize that all of these things are most likely trivial > issues and silly mistakes but my hope is that this post here may act > as an example should someone else make the same mistakes as I did. > > ~Vincent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Production install 'admin' failing with 500 internal server error
Hi Dan, Thanks for the tips. I think I've figured out what went wrong. First up: no, I am not using a virtualenv. I was able to serve the site using "./manage.py runserver" albeit a bit slow (due to load issues I believe). So the problem ultimately was my mod_wsgi setup. The fix: For starters, my httpd.conf file was poorly configured. I had defined the wrong user and group under the "WSGIDaemonProcess" directive. Ultimately, what I should've done was used the defaults instead of defining things. The documentation on the mod_wsgi wiki lead me to think otherwise. So my current config is as follows: httpd/conf.d/python.conf LoadModule wsgi_module modules/mod_wsgi.so WSGIDaemonProcess myapp WSGIProcessGroup %{GLOBAL} WSGIReloadMechanism Process Alias /media/ /usr/local/www/media/ Order allow,deny Allow from all Alias /site_media/ /usr/local/www/site_media/ Order allow,deny Allow from all WSGIScriptAlias /snufkin /usr/local/django-apps/snufkin/apache/ django.wsgi Order allow,deny Allow from all My second issue was related to the first, I had the wrong user & group for my django application. Chown-ing things to apache:apache did the trick. I realize that all of these things are most likely trivial issues and silly mistakes but my hope is that this post here may act as an example should someone else make the same mistakes as I did. ~Vincent On May 13, 6:13 pm, Daniel Hilton wrote: > Are you using a virtualenv? > > Can you serve the site using ./manage.py runserver example.com:8080 ? > > If you can serve it using the in-built server then it's likely a > problem with your mod_wsgi setup. > > If you can't serve it using the in-built server try comparing the > versions of packages installed on the server verses your local > machine. > > HTH > Dan > -- > Dan Hilton > > DanHilton.co.uk > > > > 2009/5/13 Vincent : > >> Additional information: > >> I am running Django 1.0.2 and the web host I am attempting to do this >> all on is Media Temple, in one of their Dedicated Virtual (DV) >> accounts. I followed the general guidelines for mod_wsgi setup from >> here: > >>http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango > >> None of my media, templates or app code reside in the standard MT >> httpd path: > >> /var/www/vhosts/example.com/httpdocs > >> I am using /usr/local/django-apps along with the suggested mod_wsgi >> script path of: > >> /usr/local/django-apps/myapp/apache/django.wsgi > >> My templates and media directories appear to load correctly, in >> particular, my 404 template loads just fine. > >> There's no shortage of configurations and settings to list but I am >> not sure what else to post. > > >> On May 13, 4:19 pm, Vincent wrote: > >>> Hi all: > >>> I have loaded my application on our production server but I am unable >>> to load the supplied admin interface. What's really odd is that >>> everything else seems to work fine. Databrowse works along with the >>> django 'configuration success' page. When using databrowse, I can view >>> all of my database just as I would on the dev server. My database is >>> currently a SQLite3 db and I am using the latest release version of >>> mod_wsgi all running with Python 2.4.3. When I get the "500 Internal >>> Server Error" page, it is the one generated by Apache and not django. >>> I also do not get any errors in logs/httpd/error_log. Everything runs >>> swimmingly when run locally from the built-in development server. > >>> If any other configuration info is needed, please ask. Any help would >>> be greatly appreciated. I've spent so much time working on my app, >>> it's no fun having things break at this stage. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Production install 'admin' failing with 500 internal server error
2009/5/13 Vincent : > > Additional information: > > I am running Django 1.0.2 and the web host I am attempting to do this > all on is Media Temple, in one of their Dedicated Virtual (DV) > accounts. I followed the general guidelines for mod_wsgi setup from > here: > > http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango > > None of my media, templates or app code reside in the standard MT > httpd path: > > /var/www/vhosts/example.com/httpdocs > > I am using /usr/local/django-apps along with the suggested mod_wsgi > script path of: > > /usr/local/django-apps/myapp/apache/django.wsgi > > My templates and media directories appear to load correctly, in > particular, my 404 template loads just fine. > > There's no shortage of configurations and settings to list but I am > not sure what else to post. > > > On May 13, 4:19 pm, Vincent wrote: > >> Hi all: >> >> I have loaded my application on our production server but I am unable >> to load the supplied admin interface. What's really odd is that >> everything else seems to work fine. Databrowse works along with the >> django 'configuration success' page. When using databrowse, I can view >> all of my database just as I would on the dev server. My database is >> currently a SQLite3 db and I am using the latest release version of >> mod_wsgi all running with Python 2.4.3. When I get the "500 Internal >> Server Error" page, it is the one generated by Apache and not django. >> I also do not get any errors in logs/httpd/error_log. Everything runs >> swimmingly when run locally from the built-in development server. >> >> If any other configuration info is needed, please ask. Any help would >> be greatly appreciated. I've spent so much time working on my app, >> it's no fun having things break at this stage. > > > Are you using a virtualenv? Can you serve the site using ./manage.py runserver example.com:8080 ? If you can serve it using the in-built server then it's likely a problem with your mod_wsgi setup. If you can't serve it using the in-built server try comparing the versions of packages installed on the server verses your local machine. HTH Dan -- Dan Hilton DanHilton.co.uk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Production install 'admin' failing with 500 internal server error
Additional information: I am running Django 1.0.2 and the web host I am attempting to do this all on is Media Temple, in one of their Dedicated Virtual (DV) accounts. I followed the general guidelines for mod_wsgi setup from here: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango None of my media, templates or app code reside in the standard MT httpd path: /var/www/vhosts/example.com/httpdocs I am using /usr/local/django-apps along with the suggested mod_wsgi script path of: /usr/local/django-apps/myapp/apache/django.wsgi My templates and media directories appear to load correctly, in particular, my 404 template loads just fine. There's no shortage of configurations and settings to list but I am not sure what else to post. On May 13, 4:19 pm, Vincent wrote: > Hi all: > > I have loaded my application on our production server but I am unable > to load the supplied admin interface. What's really odd is that > everything else seems to work fine. Databrowse works along with the > django 'configuration success' page. When using databrowse, I can view > all of my database just as I would on the dev server. My database is > currently a SQLite3 db and I am using the latest release version of > mod_wsgi all running with Python 2.4.3. When I get the "500 Internal > Server Error" page, it is the one generated by Apache and not django. > I also do not get any errors in logs/httpd/error_log. Everything runs > swimmingly when run locally from the built-in development server. > > If any other configuration info is needed, please ask. Any help would > be greatly appreciated. I've spent so much time working on my app, > it's no fun having things break at this stage. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Production install 'admin' failing with 500 internal server error
Hi all: I have loaded my application on our production server but I am unable to load the supplied admin interface. What's really odd is that everything else seems to work fine. Databrowse works along with the django 'configuration success' page. When using databrowse, I can view all of my database just as I would on the dev server. My database is currently a SQLite3 db and I am using the latest release version of mod_wsgi all running with Python 2.4.3. When I get the "500 Internal Server Error" page, it is the one generated by Apache and not django. I also do not get any errors in logs/httpd/error_log. Everything runs swimmingly when run locally from the built-in development server. If any other configuration info is needed, please ask. Any help would be greatly appreciated. I've spent so much time working on my app, it's no fun having things break at this stage. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---