10 votes

Why are NginX and Lighttpd not affected by Slowloris?

valyala's comment should be accepted as the answer. Most nginx servers use default configs and therefore vulnerable to slowloris attack. I have used slowloris to take down some of my friend's nginx ...
Nguyen Phan Tan's user avatar
7 votes

Handling http and https requests using a single port with nginx

This is finally possible to do properly since 1.15.2. See the information here. In your nginx.conf add a block like this (outside the http block): stream { upstream http { server ...
Sam Bull's user avatar
  • 323
7 votes
Accepted

Lighttpd doesn't start after purging Apache

Okay, I see in the new output there that this is a known bug. See https://bugs.launchpad.net/ubuntu/+source/lighttpd/+bug/1453463 The text I looked for was: undefined symbol: FAMNoExists And the ...
Peter's user avatar
  • 2,816
5 votes
Accepted

Error "SSL3_GET_CLIENT_CERTIFICATE:peer did not return a certificate" on lighttpd

The ssl.ca-file reads the content, you can call any file type here, even a .txt it doesn't matter for lighttpd if the content is a certificate or a certificate chain. When you enable ssl.verifyclient....
LeonanCarvalho's user avatar
4 votes
Accepted

Docker compose volumes invalid characters

The yaml is quite picky on docker compose. Make sure the path is absolute (for the host side) and contains no trailing spaces. "- volumes/log:/var/log/lighttpd " Should be "- /host/path/volumes/log:...
hookenz's user avatar
  • 14.6k
4 votes

Redirect to https on lighttpd

After some additional search I found a solution. Added to lighttpd.conf restarted and everything works as expected. $HTTP["scheme"] == "http" { # capture vhost name with regex conditiona -> %0 in ...
Andreas's user avatar
  • 161
4 votes

HAproxy 503 Service Unavailable No server is available to handle this request

I got a similar error because HAProxy thought my backend was down due to the default health check it does. I disabled the health check and the 503 went away. I'm using pfsense GUI:
Charlie's user avatar
  • 181
4 votes
Accepted

lighttpd proxy all except .well-known for letsencrypt

$HTTP["url"] !~ "^/.well-known/(.*)" { $SERVER["socket"] == ":443" { $HTTP["host"] == "myvhost.com" { ssl.pemfile = "/etc/letsencrypt/live/myvhost.com/ssl.pem" ssl.ca-file = "/etc/...
test's user avatar
  • 56
4 votes
Accepted

Why won't lighttpd restart despite having correct permissions?

Your permissions are wrong, both on the files access.log and error.log and on the containing directory /var/log/lighttpd. It looks like you simply ran chmod 666 on these. Of course you should never do ...
Michael Hampton's user avatar
3 votes

Lighttpd static file server 403 forbidden error

Another frequent issue is an active SELinux on the machine. Even with correct permissions on the directory tree, you will still get a 403 if the directory wasn't registered in SELinux. chcon -R -h -t ...
NoiseInTheDark TM's user avatar
3 votes
Accepted

Proxy URL to different port via Lighttpd

From your question it looks like you want to serve http://somehost.com/xxx/file from http://somehost.com:8080/file. In that case your config is wrong, because it is trying to serve http://somehost.com:...
Luca Gibelli's user avatar
  • 2,781
3 votes
Accepted

Cross platform reverse proxy with lighttpd

proxy.server do not take host as an argument, and "host" is a keyword, not a place to put your host here. Try this: $HTTP["host"] =~ "(www.)?somewebsite.com" { $HTTP[&...
kab00m's user avatar
  • 518
2 votes

Lighttpd cannot create php-fastcgi.socket

I was having the same problem with /var/run/lighttpd set owned by www-data by something instead of lighttpd user. I added the lighttpd user to the www-data group but apparently things still don't work ...
Scrooge McDuck's user avatar
2 votes

Lighttpd cannot create php-fastcgi.socket

Got Fixed with following changes: mkdir /var/run/lighttpd touch /var/run/lighttpd/php-fastcgi.socket chown -R lighttpd:lighttpd /var/run/lighttpd Where lighttpd is the username. Updating socket in ...
dreamWalker's user avatar
2 votes

How to reverse proxy https with lighttpd?

lighttpd doesn't support TLS on backend connections. If the backend needs to know whether the frontend connection was made with TLS check the X-Forwarded-Proto header. If you need an encrypted ...
Stefan's user avatar
  • 869
2 votes

SSL: couldn't read X509 certificate from pem file lighttpd

For me, putting a new line in between the key and crt in the PEM file solved this. cat my_server.key <(echo) my_server.crt > my_server.pem
user620380's user avatar
2 votes

How to disable lighttpd access log?

You can disable lighttpd logging by commenting the lines as shown in bellow: #"mod_accesslog" #accesslog.filename = "/var/log/lighttpd/access_log" However, it is not a good idea. Instead, ...
Thiago Rider Augusto's user avatar
2 votes

Rewrite URL before passing to proxy Lighttpd

This can be done with proxy.header since lighttpd v 1.4.46. See: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModProxy Example for above would be: $HTTP["url"] =~ "^/wsmobile/video/" { ...
ikwyl6's user avatar
  • 130
2 votes
Accepted

SNI for Multiple Hosts on Lighttpd

Is your domain3.com.pem file correct? Lighttpd uses a slightly less common construction where the ssl.pemfile should not only contain the signed certificate that your CA returned to you, it should ...
HBruijn's user avatar
  • 80.3k
2 votes
Accepted

How to use php-fpm in tcp mode on an external machine?

You need to have the PHP files on the servers where PHP-FPM is running. Lighttpd only passes the request to PHP-FPM, not the actual files which contain the contents. You need to also have all ...
Tero Kilkanen's user avatar
2 votes
Accepted

What’s the meaning of “(?i)” in Lighttpd rewrite rule?

It makes the match case-insensitive. https://www.regular-expressions.info/refmodifiers.html
Aaron Copley's user avatar
  • 12.7k
2 votes

Lighttpd 1.4.45 - HTTP to HTTPS redirects not replacing ${url.authority}${url.path}${qsa}

After some more research, I finally found the solution: The named placeholders are only supported for lighttpd versions 1.4.50+, but for the older version there is a different solution: $HTTP["...
SDwarfs's user avatar
  • 385
2 votes

Cross platform reverse proxy with lighttpd

$HTTP["host"] =~ "(www.)?somewebsite.com" { $HTTP["url"] =~ "^/myapp/" { url.rewrite-once = ("^/myapp/(.*)" => "/newapp/$1") } $...
gstrauss's user avatar
  • 336
2 votes
Accepted

Lighttpd Not Printing Errors for 500 anywhere?

If your script fails to return a response, then lighttpd returns 500 Internal Server Error. The CGI script is probably not following the CGI specification. ? Does your CGI script do something like: ...
gstrauss's user avatar
  • 336
1 vote
Accepted

Arch Linux - Pass MAC address of connected client to web application via web server

This can be done easily. First way I will show grabs a list of all IP/MAC pairs in case you need that. It then parses the list for the currently connected client's MAC. The second way, just quickly ...
bao7uo's user avatar
  • 1,714
1 vote

Lighttpd proxy tomcat path

You could use url.rewrite-once to prefix all requests on m.my-site.at with /mobile: $HTTP["host"] == "m.my-site.at" { url.rewrite-once = ( ".*" => "/mobile$0" ) proxy.server = (...) } You ...
Stefan's user avatar
  • 869
1 vote
Accepted

Is possible to use Lighttpd $HTTP["url"] conditional to enable ssl.verifyclient.* option dynamically?

It cannot work. SSL is negotiated before any HTTP requests are sent to the server. When negotiating the SSL connection, client sends the virtual host name using the SNI feature in SSL. Client ...
Tero Kilkanen's user avatar
1 vote

How do I set up letsencrypt with multiple domains on a lighttpd server with ubuntu 16.04?

Most tools support a "dumb webserver" mode, in which they provide files that need to be served by your webserver in the /.well-known/acme-challenge/ directory. It is also possible to generate that ...
Stefan's user avatar
  • 869
1 vote
Accepted

How do I set up letsencrypt with multiple domains on a lighttpd server with ubuntu 16.04?

It took a bit of trial and error, and throwing together bits from multiple sources. You might wish to do a few things differently depending on your needs. In this case I haven't done a few things ...
Journeyman Geek's user avatar
1 vote

Lighttpd rewrite with dot (.) in URL

Perhaps this can be done using Lighty's server.error-handler-404 option with given index.php as error page. If you are proccessing some additional information about wrong URL (I see /$1 in second ...
Max Kostikov's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible