Note that there are some explanatory texts on larger screens.

plurals
  1. POdjango deployment using wsgi, on local machine
    primarykey
    data
    text
    <p>I'm trying to learn how to deploy with mod_wsgi. I'm using django 1.4 with a small app running in virtualenv</p> <p>Here are my apache2.conf code changes (ubuntu):</p> <pre><code># https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/ # jcg 9/18/2012 WSGIScriptAlias / /home/jgoldstick/code/learn/myapp/wsgi.py #WSGIPythonPath /home/jgoldstick/code/learn/myapp WSGIPythonPath /home/jgoldstick/code/learn/myapp/lib/python2.7/site-packages &lt;Directory /home/jgoldstick/code/learn/myapp&gt; &lt;Files wsgi.py&gt; Order deny,allow Allow from all &lt;/Files&gt; &lt;/Directory&gt; </code></pre> <p>I am getting 404 pages when I access the site. I am using the standard wsgi.py script that django produces.</p> <p>what am I missing</p> <p>Update to be more complete: Here is my wsgi.py file in myapp/myapp I added the appends as per first answer.</p> <p>I am assuming in that answer that wsdl.py really meant wsgi.py.</p> <pre><code>import os, sys sys.path.append('/home/jgoldstick/code/learn') sys.path.append('/home/jgoldstick/code/learn/myapp') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings") # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION # setting points here. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplication(application) </code></pre> <p>I changed apache2.conf (which I believe is same as httpd.conf for ubuntu configuration) to:</p> <h1><a href="https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/" rel="nofollow">https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/</a></h1> <pre><code># jcg 9/18/2012 Alias /media/ /home/jgoldstick/code/learn/media/ &lt;Directory /home/jgoldstick/code/learn/media&gt; Order deny,allow Allow from all &lt;/Directory&gt; WSGIScriptAlias / /home/jgoldstick/code/learn/myapp/wsgi.py WSGIPythonPath /home/jgoldstick/code/learn/myapp/lib/python2.7/site-packages &lt;Directory /home/jgoldstick/code/learn/myapp&gt; Order deny,allow Allow from all &lt;/Directory&gt; </code></pre> <p>I restarted apache But I still get 404 when I go to my app</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload