deploy django apache centos mod-wsgi

deploy django apache centos 7



Problema con la configuraciĆ³n de Django usando mod_wsgi y apache en centos 5.4 (0)

Estoy intentando configurar apache con mod_wsgi para servir a Django a través de un proxy nginx en CentOS 5.4. Quiero comenzar configurando Apache con Wsgi para que se publique en un puerto local, pero obtengo un error 403 cuando ejecuto curl localhost:8080

# Httpd config: Listen 127.0.0.1:8080 NameVirtualHost 127.0.0.1:8080 <VirtualHost 127.0.0.1:8080> ServerName staging.example.com LogLevel warn ErrorLog /home/django/project_name/log/apache_error.log CustomLog /home/django/project_name/log/apache_access.log combined DocumentRoot /home/django/project_name/django_project_dir/ WSGIDaemonProcess staging.example.com user=apache group=apache threads=25 WSGIProcessGroup staging.example.com WSGIScriptAlias / /home/django/project_name/django_project_dir/django.wsgi <Directory /home/django/project_name/django_project_dir> Order deny,allow Allow from all </Directory> </VirtualHost>

Y mi script wsgi:

#/home/django/project_name/django_project_dir/django.wsgi ALLDIRS = [''/home/django/project_dir/virtualenv/lib/python2.4/site-packages''] import os import sys import site prev_sys_path = list(sys.path) for directory in ALLDIRS: site.addsitedir(directory) new_sys_path = [] for item in list(sys.path): if item not in prev_sys_path: new_sys_path.append(item) sys.path.remove(item) sys.path[:0] = new_sys_path sys.path.append(''/home/django/project_name/'') os.environ[''PYTHON_EGG_CACHE''] = ''/home/django/.python-eggs'' os.environ[''DJANGO_SETTINGS_MODULE''] = ''settings'' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()

¿Cuál es el problema con esta configuración?