Hi there. I’m trying to run a project on a server. I moved the project to a Windows server, fixed the database, made collectstatic, since I have little experience I roughly configured nginx, but when I did debug = false I get error 500.
In the Python console shows:
[17/Mar/2025 22:50:20] "GET / HTTP/1.0" 500 145
[17/Mar/2025 22:50:21] "GET / HTTP/1.0" 500 145
[17/Mar/2025 22:50:21] "GET /favicon.ico HTTP/1.0" 500 145
[17/Mar/2025 22:50:22] "GET /favicon.ico HTTP/1.0" 500 145
But the most incomprehensible thing is that I get this error only on the main page of the project, on other pages the project opens and works perfectly.
I searched for a long time for a solution but couldn’t figure it out and decided to remove the favicon.ico altogether, maybe it would help. It didn’t help, but in the debug mode I noticed that even if I removed the favicon from the template in networth the request goes there and shows this error
# Page not found (404)
|Request Method:|GET|
| --- | --- |
|Request URL:|http://127.0.0.1:8000/en/favicon.ico/|
|Raised by:|cms.views.details|
Using the URLconf defined in `vsite.urls`, Django tried these URL patterns, in this order:
en/ jsi18n/ [name='javascript-catalog']
en/ admin/
en/ filer/
en/ news/ [name='news_list']
en/ news/<int:news_id>/ [name='news_detail']
en/ ^cms_login/$ [name='cms_login']
en/ ^cms_wizard/
en/ ^(?P<slug>[0-9A-Za-z-_.//]+)/$ [name='pages-details-by-slug']
en/ ^$ [name='pages-root']
^media/(?P<path>.*)$
The current path, `/en/favicon.ico/`, didn’t match any of these.
Why request still going if i delete facicon on base.html?
my urls.py if it needs
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.i18n import JavaScriptCatalog
from news.views import news_list, news_detail
urlpatterns = i18n_patterns(
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
path('admin/', admin.site.urls),
path('filer/', include('filer.urls')),
path('news/', news_list, name='news_list'),
path('news/<int:news_id>/', news_detail, name='news_detail'),
path('', include('cms.urls')),
)
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
What kind of code I have to share to explain problem more? or how I can find solution in this situation?