Trouble running lighttpd with webpy
<p>This is what my lighttpd.conf file looks like:</p>

<pre><code>server.modules = (
    "mod_access",
    "mod_alias",
    "mod_compress",
    "mod_accesslog",
)

server.document-root        = "/home/ashley/leagueratings"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"


## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl"


compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/x-javascript", "text/css", "text/html", "text/plain" )

include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

server.modules   += ( "mod_fastcgi" )
server.modules   += ( "mod_rewrite" )

 fastcgi.server = ( "/leagueratings.py" =&gt;
 ("/" =&gt; ( "socket" =&gt; "/tmp/fastcgi.socket",
    "bin-path" =&gt; "/home/ashley/leagueratings.py",
    "max-procs" =&gt; 1,
   "bin-environment" =&gt; (
     "REAL_SCRIPT_NAME" =&gt; ""
   ),
   "check-local" =&gt; "disable"
 ))
 )

 url.rewrite-once = (
   "^/favicon.ico$" =&gt; "/static/favicon.ico",
   "^/static/(.*)$" =&gt; "/static/$1",
   "^/(.*)$" =&gt; "/leagueratings.py/$1",
 )
</code></pre>

<p>I've done both</p>

<pre><code>chown www-data:www-data leagueratings.py
</code></pre>

<p>and</p>

<pre><code>chmod +x leagueratings.py
</code></pre>

<p>But I cannot connect to my website. The default site work previously before I changed lighttpd.conf</p>

<p>This is the error log</p>

<pre><code>2016-09-13 19:37:35: (log.c.164) server started 
2016-09-13 19:49:49: (server.c.1558) server stopped by UID = 0 PID = 1 
2016-09-13 19:49:50: (log.c.164) server started 
2016-09-13 19:49:50: (mod_fastcgi.c.1112) the fastcgi-backend /home/ashley/leagueratings.py failed to start: 
2016-09-13 19:49:50: (mod_fastcgi.c.1116) child exited with status 2 /home/ashley/leagueratings.py 
2016-09-13 19:49:50: (mod_fastcgi.c.1119) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags. 
2016-09-13 19:49:50: (mod_fastcgi.c.1406) [ERROR]: spawning fcgi failed. 
2016-09-13 19:49:50: (server.c.1022) Configuration of plugins failed. Going down.
</code></pre>

<p>Please help me I've been trying to get my webpy server up and running for production for a long time now. I've also tried apache2 and nginx but nothing seems to work. Thank you.</p>

<blockquote>
  <p>2016-09-13 19:49:50: (mod_fastcgi.c.1112) the fastcgi-backend /home/ashley/leagueratings.py failed to start:</p>
</blockquote>

<p>This does not appear to be a web server issue.</p>

<p>Have you tried manually starting up leagueratings.py?  It is possible that a needed python module is missing (and needs to be installed), or that there is a syntax error in the python script.</p>

python lighttpd web.py