Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

I'm trying to deploy a Django project on a linode server that has apache, some other django projects and a php project on it. Also my project is in a virualenv and the other django projects aren't.

My Django project apache file is

WSGIPythonPath /home/nccylli/www/ylli_transactions:/root/Envs/ylli-transactions/lib/python2.6/site-packages
WSGISocketPrefix /var/run/apache2/wsgi
WSGIScriptAlias / /home/nccylli/www/ylli_transactions/ylli_transactions/wsgi.py
DocumentRoot /home/nccylli/www/ylli_transactions/static


<Directory /home/nccylli/www/ylli_transactions>
<Files wsgi.py>
  Order allow,deny
  Allow from all
</Files>
</Directory>

Alias  /static /home/nccylli/www/ylli_transactions/static
Alias  /media /home/nccylli/www/ylli_transactions/media

ErrorLog /home/nccylli/www/ylli_transactions/logs/error.log
CustomLog /home/nccylli/www/ylli_transactions/logs/access.log combined

<VirtualHost *:80>
   ServerName my-domain.com
   ServerAlias www.my-domain.com
   ServerAdmin my-email


</VirtualHost>

The PHP project apache file

<VirtualHost *:80>
        ServerName php-prject-domain
    ServerAlias www.php-prject-domain
        DocumentRoot /home/nccylli/www/php-prject/

    CustomLog     /var/log/apache2/php-prject-access.log combined
    ErrorLog      /var/log/apache2/php-prject-error.log

        <IfModule mpm_itk_module>
                AssignUserId nccylli nccylli
        </IfModule>
</VirtualHost>

Now I'm running into two errors
in the django project error log

(13)Permission denied: access to / denied
(13)Permission denied: mod_wsgi (pid=9780, process='', application='my-domain.com|'): Call to fopen() failed for '/home/nccylli/www/ylli_transactions/ylli_transactions/wsgi.py'.

and in the php project error log

mod_wsgi (pid=26782): Target WSGI script '/home/nccylli/www/ylli_transactions/ylli_transactions/wsgi.py' cannot be loaded as Python module.
mod_wsgi (pid=26782): Exception occurred processing WSGI script '/home/nccylli/www/ylli_transactions/ylli_transactions/wsgi.py'.
Traceback (most recent call last):
  File "/home/nccylli/www/ylli_transactions/ylli_transactions/wsgi.py", line 13, in <module>
    from django.core.wsgi import get_wsgi_application
ImportError: No module named wsgi

Any thoughts?

share|improve this question

Try using following code:

<Directory /home/nccylli/www/ylli_transactions/ylli_transactions>
<Files wsgi.py>
  Order allow,deny
  Allow from all
</Files>
</Directory>
share|improve this answer
    
I'm getting the same errors – dado_eyad Dec 11 '13 at 11:44
    
@dado_eyad have you added WSGIPythonPath,WSGISocketPrefix and WSGIScriptAlias correctly? – Prashant Borde Dec 12 '13 at 11:32
    
Yes, they're the correct paths. – dado_eyad Dec 12 '13 at 11:53
    
Can you show me value of each of these: WSGIPythonPath, WSGISocketPrefix, WSGIScriptAlias and absolute path to wsgi.py? – Prashant Borde Dec 12 '13 at 12:33
    
They are up there in the first file in my post. It's okay though, we moved to another server and configured everything with ngix and virtualenvs. – dado_eyad Dec 13 '13 at 13:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.