title: web.py + uwsgi + nginx no application found
body: <p>i'm trying to deploy nginx uwsgi and web.py</p>
  
  <p>Here is my index.py in /www/python/testme/</p>
  
  <pre><code>import web
  
  urls = (
    '/', 'index'
  )
  
  app = web.application(urls, globals())
  
  class index:
          def GET(self):
                  return "Hello, world!"
  
  if __name__ == "__main__": app.run()
  
  application = app.wsgifunc
  </code></pre>
  
  <p>Here is my nginx configuration for python with uwsgi</p>
  
  <pre><code>/etc/nginx/sites-available/python
      server {
              listen          8080;
              server_name     $hostname;
              access_log /www/python/testme/logs/access.log;
              error_log /www/python/testme/logs/error.log;
  
              location / {
                  #uwsgi_pass      127.0.0.1:9001;
                  uwsgi_pass      unix:///tmp/test.socket;
                  include         uwsgi_params;
                  uwsgi_param     UWSGI_SCHEME $scheme;
                  uwsgi_param     SERVER_SOFTWARE    nginx/$nginx_version;
              }
  
  
      }
  </code></pre>
  
  <p>Uwsgi ini in /etc/uwsgi/app-available/testme.ini</p>
  
  <pre><code>[uwsgi]
  gid = www-data
  uid = www-data
  logdate = true
  logto = /var/log/uwsgi/testme.log
  socket = /tmp/test.socket
  #socket = 127.0.0.1:3031
  master = true
  plugins = python
  </code></pre>
  
  <p>My uwsgi service is working, and nginx is listening port 8080 as expected. </p>
  
  <p>How ever when i access my domain from browser here is error log:
  /var/log/uwsgi/testme.log</p>
  
  <pre><code>ImportError: No module named index
  Wed Jun 25 19:14:54 2014 - unable to load app 0 (mountpoint='') (callable not found or import error)
  Wed Jun 25 19:14:54 2014 - --- no python application found, check your startup logs for errors ---
  [pid: 32604|app: -1|req: -1/5] 46.197.209.106 () {48 vars in 919 bytes} [Wed Jun 25 19:14:54 2014] GET / =&gt; generated 21 bytes in 0 msecs (HTTP/1.1 500) 1 headers in 57 bytes (0 switches on core 0)
  ImportError: No module named index
  Wed Jun 25 19:14:54 2014 - unable to load app 0 (mountpoint='') (callable not found or import error)
  Wed Jun 25 19:14:54 2014 - --- no python application found, check your startup logs for errors ---
  [pid: 32604|app: -1|req: -1/6] 46.197.209.106 () {46 vars in 839 bytes} [Wed Jun 25 19:14:54 2014] GET /favicon.ico =&gt; generated 21 bytes in 0 msecs (HTTP/1.1 500) 1 headers in 57 bytes (0 switches on core 0)
  </code></pre>