Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7775501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:38:50+00:00 2026-06-01T17:38:50+00:00

I think my apache2 server is close to being set up but it’s still

  • 0

I think my apache2 server is close to being set up but it’s still returning a 500 error. Here is my .wsgi file:

import os, sys

#path to directory of the .wsgi file ('apache/')
wsgi_dir = os.path.abspath(os.path.dirname(__file__))

#path to project root directory (parent of 'apache/')
project_dir = os.path.dirname(wsgi_dir)

sys.path.append(project_dir)
project_settings = os.path.join(project_dir, 'settings')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ecomstore.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Here is my virtualhost file:

NameVirtualHost *:80
 <VirtualHost *:80>
      ServerAdmin admin@site.com
      ServerName www.site.com
      ServerAlias site.com

      Alias /static /home/ecomstore/static

      DocumentRoot /home/ecomstore
      WSGIScriptAlias / /home/ecomstore/apache/ecomstore.wsgi

      ErrorLog /var/log/apache2/error.log

      LogLevel warn

      CustomLog /var/log/apache2/access.log combined

 </VirtualHost>

Here is my server restart:

sudo /etc/init.d/apache2 restart
 * Restarting web server apache2
[Sun Apr 08 02:47:31 2012] [warn] module wsgi_module is already loaded, skipping
 ... waiting ..........[Sun Apr 08 02:47:42 2012] [warn] module wsgi_module is already loaded, skipping
   ...done.

However, even though I get no errors with mod-wsgi configuration on the restart, I still get the 500 Internal Server error mentioned before. Is there anything I’m missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:38:51+00:00Added an answer on June 1, 2026 at 5:38 pm

    You would need to look at the Apache error logs from when you made the request and not when you did the restart.

    One source of problems is that sys.path does not include the parent directory of the project directory which would be necessary because of what you set DJANGO_SETTINGS_MODULE to. Go read about this requirement in:

    http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

    and fix it.

    Beyond that, you need to work out whether it is an Apache 500 page or a Django one. If it is a Django one, then turn on DEBUG in Django settings file and restart Apache so you get a full error shown in browser. Turn off DEBUG when you have resolved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think I'm missing a very obvious solution here, but I'll ask anyway. I've
I've set up DAV in apache2, which works great. The thing is, all read/write
I think I understand the basic principals of T4 but I'm having a hard
I think know how to do this in C# but I'm having syntax trouble
I think I have a performance problem in my apache server. I have apache
I'm trying to use setup the rails application on apache2 using the virtual server
Here is the thing: We've implemented a C++ RESTful API Server, with built-in HTTP
I am trying to write something to an empty file on my apache server
I have ini files that have comments in the but in one ini file
I have a server which is online right now, but requires authentication when accessing,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.