Re: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.
Hi. Have you created a 500.html file in your templates directory? Aaron On 1/21/12, Chris Seberino wrote: > >> Check your apache logs. > > Last line below says error is that there is no handler500. I thought > a missing web page for some URL was a 404 error so I'm not sure why > this error is popping up. > > cs > > > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] mod_wsgi > (pid=19346): Exception occurred processing WSGI script '/etc/apache2/ > wsgi/phil4.com.wsgi'. > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] Traceback > (most recent call last): > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ > lib/pymodules/python2.6/django/core/handlers/wsgi.py", line 241, in > __call__ > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] response > = self.get_response(request) > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ > lib/pymodules/python2.6/django/core/handlers/base.py", line 130, in > get_response > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] return > self.handle_uncaught_exception(request, resolver, sys.exc_info()) > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ > lib/pymodules/python2.6/django/core/handlers/base.py", line 179, in > handle_uncaught_exception > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] > callback, param_dict = resolver.resolve500() > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ > lib/pymodules/python2.6/django/core/urlresolvers.py", line 263, in > resolve500 > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] return > self._resolve_special('500') > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ > lib/pymodules/python2.6/django/core/urlresolvers.py", line 253, in > _resolve_special > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] callback > = getattr(self.urlconf_module, 'handler%s' % view_type) > [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] > AttributeError: 'module' object has no attribute 'handler500' > > -- > 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. > > -- 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: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.
Any hints in the Apache error logs? Aaron On 1/21/12, Chris Seberino wrote: > I am proxying my Django app behind Apache. I created a 404.html in my > template directory but when I try to test it I get the following error > that appears to come from Apache... > > Internal Server Error > > The server encountered an internal error or misconfiguration and was > unable to complete your request. > > Please contact the server administrator, [no address given] and inform > them of the time the error occurred, and anything you might have done > that may have caused the error. > > More information about this error may be available in the server error > log. > Apache/2.2.16 (Ubuntu) Server at phil4.com Port 80 > > Here is the relevant Apache settings... > > NameVirtualHost 72.14.188.15:80 > NameVirtualHost 72.14.188.15:443 > WSGIRestrictEmbedded On > > > # > = > ServerName phil4.com > ServerAlias www.phil4.com > DocumentRoot/var/www > Options Indexes FollowSymLinks > # > = > WSGIProcessGroupphil4.com > WSGIScriptAlias / /etc/apache2/wsgi/phil4.com.wsgi > WSGIDaemonProcess phil4.com user=seb group=seb threads=25 > # > = > > Order Allow,Deny > Allow from All > > # > = > Alias /favicon.ico /var/www/static/images/favicon.ico > Alias /base.css/var/www/static/base.css > Alias /static /var/www/static > Alias /public /var/www/static/public > Alias /misc/var/www/static/misc > Alias /images /var/www/static/images > Alias /books/ /var/www/static/books/ > Alias /homework/ /var/www/static/homework/ > Alias /exams/ /var/www/static/exams/ > # > = > Redirect /sign_in https://phil4.com/sign_in > Redirect /register https://phil4.com/register > # > = > > > -- > 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. > > -- 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: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.
On 21-01-12 20:27, Chris Seberino wrote: AttributeError: 'module' object has no attribute 'handler500' On older Django versions (1.2 and earlier, iirc), you needed to import handler500 from django.conf.urls.defaults in your urls.py. That's why there's often a "star import" in urls.py files: from django.conf.urls.defaults import * You probably thought a star import to be dirty (you're completely right) and cleaned it up by only importing what you needed. There's a hidden requirement that you also need to import handler500. The latest Django doesn't have this requirement, btw. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- 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: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.
> Check your apache logs. Last line below says error is that there is no handler500. I thought a missing web page for some URL was a 404 error so I'm not sure why this error is popping up. cs [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] mod_wsgi (pid=19346): Exception occurred processing WSGI script '/etc/apache2/ wsgi/phil4.com.wsgi'. [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] Traceback (most recent call last): [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ lib/pymodules/python2.6/django/core/handlers/wsgi.py", line 241, in __call__ [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] response = self.get_response(request) [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ lib/pymodules/python2.6/django/core/handlers/base.py", line 130, in get_response [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] return self.handle_uncaught_exception(request, resolver, sys.exc_info()) [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ lib/pymodules/python2.6/django/core/handlers/base.py", line 179, in handle_uncaught_exception [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] callback, param_dict = resolver.resolve500() [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ lib/pymodules/python2.6/django/core/urlresolvers.py", line 263, in resolve500 [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] return self._resolve_special('500') [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] File "/usr/ lib/pymodules/python2.6/django/core/urlresolvers.py", line 253, in _resolve_special [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] callback = getattr(self.urlconf_module, 'handler%s' % view_type) [Sat Jan 21 13:24:44 2012] [error] [client 75.108.243.48] AttributeError: 'module' object has no attribute 'handler500' -- 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: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.
On Sat, Jan 21, 2012 at 2:28 PM, Chris Seberino wrote: > I am proxying my Django app behind Apache. I created a 404.html in my > template directory but when I try to test it I get the following error > that appears to come from Apache... > > Internal Server Error > Check your apache logs. -- Kind Regards -- 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.
Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.
I am proxying my Django app behind Apache. I created a 404.html in my template directory but when I try to test it I get the following error that appears to come from Apache... Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.2.16 (Ubuntu) Server at phil4.com Port 80 Here is the relevant Apache settings... NameVirtualHost 72.14.188.15:80 NameVirtualHost 72.14.188.15:443 WSGIRestrictEmbedded On # = ServerName phil4.com ServerAlias www.phil4.com DocumentRoot/var/www Options Indexes FollowSymLinks # = WSGIProcessGroupphil4.com WSGIScriptAlias / /etc/apache2/wsgi/phil4.com.wsgi WSGIDaemonProcess phil4.com user=seb group=seb threads=25 # = Order Allow,Deny Allow from All # = Alias /favicon.ico /var/www/static/images/favicon.ico Alias /base.css/var/www/static/base.css Alias /static /var/www/static Alias /public /var/www/static/public Alias /misc/var/www/static/misc Alias /images /var/www/static/images Alias /books/ /var/www/static/books/ Alias /homework/ /var/www/static/homework/ Alias /exams/ /var/www/static/exams/ # = Redirect /sign_in https://phil4.com/sign_in Redirect /register https://phil4.com/register # = -- 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.