Skip to content

Ubuntu 16.04 to 20.04 upgrade path issues #12

Description

@Billynkid

We recently decided to upgrade our RS to Ubuntu 20.04. For the most part the upgrade was painless. Went from 16.04 to 18.04 then to 20.04.

The once issue we did discover and managed to resolve was with lighttpd. Post upgrade the server was throwing;

(mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri: /api/protocols/bgp
2020-08-23 00:12:34: (mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri: /api/protocols/bgp
2020-08-23 00:12:36: (mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri: /api/status
2020-08-23 00:13:36: (mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri: /api/status
2020-08-23 00:13:46: (mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri:

in the lighttpd error.log file.

I was able to find the following solution on stackoverflow https://stackoverflow.com/questions/3965651/lighttpd-configuration-dots-in-my-query-string-cause-404

copying the url.rewrite-once

url.rewrite-once = (
"^/(js|images|uploads|css|sf)/(.)" => "$0", # we want to load these assets as is, without index.php
"^/[a-zA-Z_-]+.(html|txt|ico)$" => "$0", # for any static .html files you might be calling in your web root, we don't want to put the index.php controller in front of them
"^/sf[A-z]+Plugin.
" => "$0", # don't want to mess with plugin routes
"^/([a-z_]+).php(.).(.)$" => "/$1.php$2.$3", # same concept as rules below, except for other applications/environments (backend.php, backend_dev.php, etc)
"^/([a-z_]+).php([^.])$" => "/$1.php$2", # see comment right above this one
"^/(.
).(.*)$" => "/index.php/$1.$2", # handle query strings and the dot problem!
"^/([^.]+)$" => "/index.php/$1", # general requests
"^/$" => "/index.php" # the home page
)

restart lighttpd and this now appears to work successfully.

Will try and document if anything else but so far so good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions