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

  • SEARCH
  • Home
  • 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 248239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:19:35+00:00 2026-05-11T21:19:35+00:00

I’ve got lighttp configured to start and serve django via fastcgi on ubuntu. When

  • 0

I’ve got lighttp configured to start and serve django via fastcgi on ubuntu. When I have only a single site enabled (via ubuntu’s apache-like conf-available, conf-enabled mechanism), everything runs beautifully. When I enable a second site, my url rewrites seem to stop working correctly, though the fcgi processes are started and serving data. Here’s my configuration:

conf-available/10-example.conf

$HTTP["host"] == "example.com" {
    var.virt_name = "example"
    include "includes/incl-fastcgi.conf"
}

includes/incl-fastcgi.conf

global {
    server.modules += ("mod_rewrite",
                   "mod_fastcgi")
}

var.site_folder = "/" + virt_name
var.site_root = server_root + site_folder
var.socket = server_root + "/.handles/" + virt_name + ".socket"
server.document-root = site_root

fastcgi.server = (
    "/django.fcgi" => (
        "main" => (
            "socket" => socket,
            "bin-path" => "/etc/lighttpd/scripts/fcgi.sh",
            "bin-environment" => ( "VIRT" => virt_name, ),
            "check-local" => "disable",
            "min-procs" => 1,
            "max-procs" => 1,
            "allow-x-send-file" => "enable",
        ),
    ),
)

alias.url = (
    "/media/admin" => "/usr/share/python-support/python-django/django/contrib/admin/media", #why the hell does it live here?
)

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

When I enable the second site, everything is identical except that now there’s a second link to a (slightly modified) copy of 10-example.conf in conf-enabled. When this happens, my sites fail with this django-served error:

Page not found (404)
Request Method:     GET
Request URL:    http://example.com/django.fcgi/[the url I requested]

I’m not sure why enabling another site should break the existing setup. I believe the host-based syntax should isolate any changes to that specific host, but it does not seem to be the case.

  • 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-05-11T21:19:35+00:00Added an answer on May 11, 2026 at 9:19 pm

    In case anyone in the future looks at this question, I believe the answer was that it’s fixed in version 1.4.20 or later and the server was running v1.4.19 since that’s what Ubuntu’s repository had.

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

Sidebar

Related Questions

No related questions found

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.