I have a problem deploying my Django application to a web server that runs lighttpd. Unfortunately, I followed the instructions in the Django docs, but it simply doesn't work for me. With the configuration there, the Application basically runs, but URLs are only accessible via /app.fcgi, /app.fcgi/foo/bar etc. - but I want it to be like / and /foo/bar. I even added FORCE_SCRIPT_NAME = '' to the settings.py and restarted the web server and all Django fastcgi instances, but that didn't help.

lighttpd config:

fastcgi.server = (
  "/app.fcgi" => (
    "main" => (
      "socket" => "/var/www/app/app.sock",
      "check-local" => "disable"
    )
  ),
)

alias.url = (
  "/media" => "/usr/share/django/django/contrib/admin/media/",
  "/static" => "/var/www/app/static/"
)

url.rewrite-once = (
  "^(/media.*)$" => "$1",
  "^(/static.*)$" => "$1",
  "^/favicon\.ico$" => "/media/favicon.ico",
  "^/(.*)$", "/nmc.fcgi$1",
)

What can I do to achieve this?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.