Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8788473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:09:10+00:00 2026-06-13T22:09:10+00:00

I am having trouble deploying my django app to a server that uses lighttpd

  • 0

I am having trouble deploying my django app to a server that uses lighttpd (on which I’m root.)

Here’s my lighttpd.conf:

server.modules = (
#       "mod_access",                                                                                                                                                                
#       "mod_alias",                                                                                                                                                                 
#               "mod_compress",                                                                                                                                                      
#       "mod_redirect",                                                                                                                                                              
        "mod_status",
        #"mod_rewrite",                                                                                                                                                              
        #       "mod_fastcgi",                                                                                                                                                       
#       "mod_accesslog",                                                                                                                                                             
)

status.status-url          = "/server-status"
status.config-url          = "/server-config"

$HTTP["host"] == "myurl.com" {
server.document-root = "/var/www/myurl"
server.errorlog = "/var/log/lighttpd/myurl/error.log"
accesslog.filename = "var/log/lighttpd/nixcraft/access.log"
server.error-handler-404 = "/e404.html"

fastcgi.server = (
    "/myurl/nonorientable.fcgi" => (
        "main" => (
            # Use host / port instead of socket for TCP fastcgi                                                                                                                      
            # "host" => "127.0.0.1",                                                                                                                                                 
            # "port" => 3033,                                                                                                                                                        
            "socket" => "/tmp/myurl.sock",
            "check-local" => "disable",
        )
    ),
)
}

server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm")

url.access-deny             = ( "~", ".inc" )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )


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

dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"

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_auth" )
auth.debug = 2
auth.backend = "plain"
auth.backend.plain.userfile = "/etc/lighttpd/.lighttpdpassword"

auth.require = ( "/" =>
("method" => "basic",
 "realm" => "",
 "require" => "user=john"))

And then I ran this on my server (from the folder /var/www/myurl):
sudo python manage.py runfcgi daemonize=false socket=/tmp/myurl.sock maxrequests=1

At this point, when I try to load myurl.com, all I get is the directory listing: my django app is not executed. I thought that the problem was that mod_fastcgi is commented in my conf, it actually appears on myurl.com/server-config. If I uncomment it, lighttpd complains that I’m trying to load the same module twice and exits, so my guess is that it is imported by default.

I’m using django1.4 (latest stable) and lighttpd 1.4.28 on ubuntu 12.04, and I’m pretty stuck. I followed the official doc (https://docs.djangoproject.com/en/1.4/howto/deployment/fastcgi/)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:09:11+00:00Added an answer on June 13, 2026 at 10:09 pm

    It looks like your missing the rewrite directive given in the docs:

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

    Update: You need to change the fastcgi.server section from /myurl/nonorientable.fcgi to /mysite.fcgi so that it matches the rewrite above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble getting django-social-auth to work with a Django app that I'm deploying
I'm having trouble deploying .NET application which uses Microsoft Access automation. I've installed the
I am having trouble deploying a Silverlight5 application. I'm releasing to a Windows server
I am having trouble deploying express app on nodester. After successfully running the default
We've having trouble deploying a web service that works in our development environment, but
I'm running a tomcat-6 server on Gentoo. I'm having trouble deploying Nexus to my
I'm having trouble deploying my Web start to the web server due to permissions
I'm having trouble deploying my rails app to heroku. I just fixed an error
I'm having trouble deploying QuickTime references using ClickOnce in VS2010. The app runs just
I am having trouble deploying a JApplet using netbeans into a working web server.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.