4
votes

I have created a Django app (which is working properly locally), but I am unable to deploy in Azure Web Sites. I get a "HTTP 500 Internal Server Error".

Since the site is working locally, I believe that I might be doing something wrong in the configuration of the app.

I have the following in app settings:

DJANGO_SETTINGS_MODULE | chocolate.settings
PYTHONPATH | C:\Users\User\Dropbox\chocolate-chocolate\chocolate;C:\Users\User\Dropbox\chocolate-chocolate\site-packages 
WSGI_HANDLER | django.core.handlers.wsgi.WSGIHandler()

and this for Handlers:

* | C:\Python27\python.exe | C:\python27\Scripts\wfastcgi.py

This is the file hierarchy of my app:

chocolate-chocolate\
     chocolate\
       chocolate # this is the app
          chocolate\
            manage.py
            web.config
               chocolate\
                 __init__.py
                 settings.py
                 urls.py
                 wsgi  
                    ...
site-packages\
      django\
          ....
2
Set DEBUG=True in your settings.py and see you get any more details for the error. - Rohan
I've done so. Unfortunately, I don't get any further information - user2935750
a simple 500 you need access to the server error logs to find out what the problem is. I'm not familiar with azure but somehow they have to give you access to server logs. - Chris Hawkes

2 Answers

0
votes

If you have set DEBUG=False in the settings, then you have to enter your website's host to the ALLOWES_HOSTS settings.

If you have not done so, you will get errors like the one you mention.

0
votes

I suggest that you check out the console data. Right click and open the dev tools from your browser. Make a page request or reload the page. Check the network panel, it should contain the response data in full html which will have the output.