How do I get rid of a 500 Internal Server Error with apache and django

I recently uploaded a django site which worked well until I installed apache. Once the site was ready to go live I tested the ip address only to get a 500 Internal Server Error.

The 500 error applies to all the pages of my django site.I have double checked everything i can think of without any success.

the apache error logs give me three different causes
-Failed to exec Python script file(wsgi.py)
-Exception occurred processing WSGI script(wsgi.py)
-SyntaxError: invalid syntax(settings.py: secret key)

How do I get rid of this?

1 Reply

Hey Scotty -

A 500 Error has a few potential causes, and I wanted to link you to another post that gives some detail on those:

500: Internal Server Error

For the specific errors you're getting, I found some resources for you that might help you out:

-Failed to exec Python script file(wsgi.py)
-Exception occurred processing WSGI script(wsgi.py)

This page suggests changing the wsgi.py file by adding a few lines.

-SyntaxError: invalid syntax(settings.py: secret key)

This might help you out. It looks like this may be a similar issue to what you're facing.

These are just suggestions based on what I can see. I hope they're able to help.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct