python-3.xdjangoapachecpaneldjango-wsgi

Main page with host name is not opening in Django app on live server


I am hosting a Django app on managed server with passenger_wsgi.py file. Lets say my domain name is food.menu , when i visit 'https://food.menu' browser shows me

Not Allowed

but when i visit 'https://food.menu/Menu' then these links are accessible.

foodsample> urls.py file looks like this

urlpatterns = [
path('admin/', admin.site.urls),
path('', include('food.Urls.WebsiteUrls'))]

food> urls.py file looks like this

    urlpatterns = [
    path('', WebsiteViews.Home, name='HomePage'),
    path('menusearch', WebsiteViews.Search_Menu, name='menusearch'),
    path('MenuQR', WebsiteViews.MenuQRCode, name='MenuQR'),
    path('Menu', WebsiteViews.Menu, name='Menu'),
    path('QRScanner', WebsiteViews.Scanner_View, name='QRScanner')]

on localhost its working fine but on live server main url path('', WebsiteViews.Home, name='HomePage') with domain name is not opening.

Cpanel Application Manager Setting:

1.Application Manager>Deployment Domain, i have selected my domain 'food.menu'.

2.Base Application URL Enter the application’s base URL. After you register the application, you can use this URL to access it. i wrote nothing by default its giving the domain name and a '/' after domain name, like 'food.menu/'.

Any kind of help would be great.

Thanks..!!


Solution

  • I'm answering my own question, The issue was fixed after I have restarted my app from Application Manager section. I have disabled the app for less then a minute and the re-enabled it and the issue is gone.