added configuration reg. curl and lighttpd with error code 417
This commit is contained in:
parent
57762a8038
commit
263c9f30a1
|
@ -1,4 +1,4 @@
|
||||||
Below is a sample config for Lighttpd that
|
Below is a sample config for Lighttpd that
|
||||||
seems to work well on Debian Squeeze, with "lighttpd/1.4.28 (ssl)"
|
seems to work well on Debian Squeeze, with "lighttpd/1.4.28 (ssl)"
|
||||||
|
|
||||||
The idea is: if someone enters the bare URL for my site, 'example.com',
|
The idea is: if someone enters the bare URL for my site, 'example.com',
|
||||||
|
@ -21,6 +21,18 @@ the requested URL.
|
||||||
|
|
||||||
Enjoy!
|
Enjoy!
|
||||||
|
|
||||||
|
On Debian Jessie with lighttpd 1.4.35-4 there was a problem encountered
|
||||||
|
between curl (which is used by Friendica in the background) and lighttp.
|
||||||
|
This problem caused requests being served with an error code of 417 in
|
||||||
|
the logs and no delivery of postings from the contacts.
|
||||||
|
|
||||||
|
One can solve the issue by adding
|
||||||
|
|
||||||
|
server.reject-expect-100-with-417 = "disable"
|
||||||
|
|
||||||
|
to the lighttpd configuratiion file (e.g. in the beginning with the
|
||||||
|
other 'server.xxx' settings.
|
||||||
|
|
||||||
---------------( config starts )-----------------
|
---------------( config starts )-----------------
|
||||||
|
|
||||||
debug.log-request-handling = "disable"
|
debug.log-request-handling = "disable"
|
||||||
|
@ -50,21 +62,16 @@ ssl.ca-file = "/etc/lighttpd/ssl/ca.pem"
|
||||||
# fix for problem between curl and lighttpd
|
# fix for problem between curl and lighttpd
|
||||||
server.reject-expect-100-with-417 = "disable"
|
server.reject-expect-100-with-417 = "disable"
|
||||||
|
|
||||||
# Send everybody to landing
|
# Send everybody to landing page:
|
||||||
page:
|
|
||||||
$SERVER["socket"] == ":80" {
|
$SERVER["socket"] == ":80" {
|
||||||
|
|
||||||
$HTTP["scheme"] == "http" {
|
$HTTP["scheme"] == "http" {
|
||||||
$HTTP["host"] =~ ".*" {
|
$HTTP["host"] =~ ".*" {
|
||||||
# This next redirect doesn't appear to ever execute in
|
# This next redirect doesn't appear to ever execute in Firefox
|
||||||
Firefox
|
# (sometimes, anyway -- caching issue?), but it does seem to
|
||||||
# (sometimes, anyway -- caching issue?), but it does seem
|
# reliably in Google's Chromium browser. If I change it here
|
||||||
to
|
# and restart Lighty, Firefox still goes to the URL in the
|
||||||
# reliably in Google's Chromium browser. If I change it
|
# last 'else' below. Or something.
|
||||||
here
|
|
||||||
# and restart Lighty, Firefox still goes to the URL in
|
|
||||||
the
|
|
||||||
# last 'else' below. Or something.
|
|
||||||
Sometimes.
|
Sometimes.
|
||||||
server.document-root = "/var/www"
|
server.document-root = "/var/www"
|
||||||
url.redirect = (".*" => "https://example.com")
|
url.redirect = (".*" => "https://example.com")
|
||||||
|
@ -79,8 +86,7 @@ $HTTP["scheme"] == "https" {
|
||||||
$HTTP["host"] == "wordpress.example.com" {
|
$HTTP["host"] == "wordpress.example.com" {
|
||||||
server.document-root = "/var/www/wordpress"
|
server.document-root = "/var/www/wordpress"
|
||||||
ssl.pemfile = "/etc/lighttpd/ssl/wordpress.pem"
|
ssl.pemfile = "/etc/lighttpd/ssl/wordpress.pem"
|
||||||
# include
|
# include "wpmu-rewrites.conf"
|
||||||
"wpmu-rewrites.conf"
|
|
||||||
url.rewrite-if-not-file = (
|
url.rewrite-if-not-file = (
|
||||||
"^/(.*/)?files/$" => "/index.php",
|
"^/(.*/)?files/$" => "/index.php",
|
||||||
"^/(.*/)?files/(.*)" => "/wp-includes/ms-files.php?file=$2",
|
"^/(.*/)?files/(.*)" => "/wp-includes/ms-files.php?file=$2",
|
||||||
|
@ -93,10 +99,8 @@ $HTTP["scheme"] == "https" {
|
||||||
else $HTTP["host"] == "friendica.example.com" {
|
else $HTTP["host"] == "friendica.example.com" {
|
||||||
server.document-root = "/var/www/friendica"
|
server.document-root = "/var/www/friendica"
|
||||||
ssl.pemfile = "/etc/lighttpd/ssl/friendica.pem"
|
ssl.pemfile = "/etc/lighttpd/ssl/friendica.pem"
|
||||||
# Got the following 'Drupal Clean URL'after Mike suggested
|
# Got the following 'Drupal Clean URL'after Mike suggested trying
|
||||||
trying
|
# something along those lines, from http://drupal.org/node/1414950
|
||||||
# something along those lines, from
|
|
||||||
http://drupal.org/node/1414950
|
|
||||||
url.rewrite-if-not-file = (
|
url.rewrite-if-not-file = (
|
||||||
"^\/([^\?]*)\?(.*)$" => "/index.php?q=$1&$2",
|
"^\/([^\?]*)\?(.*)$" => "/index.php?q=$1&$2",
|
||||||
"^\/(.*)$" => "/index.php?q=$1"
|
"^\/(.*)$" => "/index.php?q=$1"
|
||||||
|
@ -124,12 +128,8 @@ include_shell "/usr/share/lighttpd/use-ipv6.pl"
|
||||||
dir-listing.encoding = "utf-8"
|
dir-listing.encoding = "utf-8"
|
||||||
server.dir-listing = "disable"
|
server.dir-listing = "disable"
|
||||||
|
|
||||||
#compress.cache-dir =
|
#compress.cache-dir = "/var/cache/lighttpd/compress/"
|
||||||
"/var/cache/lighttpd/compress/"
|
#compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/p\lain" )
|
||||||
#compress.filetype = ( "application/x-javascript", "text/css",
|
|
||||||
"text/html", "text/p\
|
|
||||||
lain"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
||||||
|
|
Loading…
Reference in a new issue