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 852171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:33:04+00:00 2026-05-15T07:33:04+00:00

I’ve been given a lighttpd.conf that someone else wrote and need help working out

  • 0

I’ve been given a lighttpd.conf that someone else wrote and need help working out how to serve it. I’m 90% of the way there but stuck… The index.html page appears, but links and CSS files don’t point to the right place.

To clarify, the links and CSS files are all pointing to a ‘file:///’ URL. So styles.css in the HTML header points to file:///html/styles.css, whereas it should be going to http://example.com/styles.css

Maybe url.rewrite or url.redirect isn’t working properly?

server.document-root = "~/html"
server.port = 28001
mimetype.assign = (
  ".html" => "text/html", 
  ".txt" => "text/plain",
  ".jpg" => "image/jpeg",
  ".png" => "image/png" 
)
url.rewrite = (
  "^(.*)/($|\?.*)" => "$1/index.html",
  "^(.*)/([^.?]+)($|\?.*)$" => "$1/$2.html"
)
$HTTP["scheme"] == "http" {
  url.redirect = ( 
                   "^/platform/index.html$" => "/platform",
                   "^/about/company.html$" => "/about/company",,
  )
}

—– UPDATE ——

file:/// problem now solved, thanks to Marcel. However, http://example.com/about/company still doesn’t find anything, whereas http://example.com/about/company.html renders OK. Is there a problem with url.rewrite? I’m using v1.4.20 of lighttpd, so maybe I need to change it to rewrite-once or rewrite-final?

  • 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-15T07:33:04+00:00Added an answer on May 15, 2026 at 7:33 am

    About the original problem: it’s not a problem of web server configuration, but of the HTML being served, likely containing the file:// protocol. Use http:// instead.

    Regarding the second problem: I’m not an expert in Lighttpd configuration options, but it might help if you exchange those settings in url.redirect and get rid of the trailing commas, like:

      url.redirect = ( 
                       "^/platform$" => "/platform/index.html",
                       "^/about/company$" => "/about/company.html"
      )
    

    (but I’m not sure). See the documentation for examples.

    BTW, is mod_redirect loaded in server.modules?

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

Sidebar

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.